public abstract class AVControllerCallback extends Object
AVSession,You can use
AVController.setAVControllerCallback(AVControllerCallback),to
register a callback with the media session.SystemCapability.Multimedia#MEDIA| 构造器 | 说明 |
|---|---|
AVControllerCallback() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
onAVMetadataChanged(AVMetadata metadata) |
Called when media metadata changes.
|
void |
onAVPlaybackStateChanged(AVPlaybackState state) |
Called when the playback state changes.
|
void |
onAVQueueChanged(List<AVQueueElement> queue) |
Called when the playback queue changes.
|
void |
onAVQueueTitleChanged(CharSequence title) |
Called when the playback queue title changes.
|
void |
onAVSessionDestroyed() |
Called when a request to destroy the media session is received.
|
void |
onAVSessionEvent(String event,
PacMap options) |
Called when an event sent by the media session through
AVSession.sendAVSessionEvent(java.lang.String, ohos.utils.PacMap) is received. |
void |
onOptionsChanged(PacMap options) |
Called when additional information about the media session changes.
|
public void onAVSessionDestroyed()
public void onAVSessionEvent(String event, PacMap options)
AVSession.sendAVSessionEvent(java.lang.String, ohos.utils.PacMap) is received.
You need to override this callback to handle the eventevent - Indicates the name of the event that has been sentoptions - Indicates additional information about the eventpublic void onAVPlaybackStateChanged(AVPlaybackState state)
state - Indicates the new playback state, which is one defined in
AVPlaybackStatepublic void onAVMetadataChanged(AVMetadata metadata)
metadata - Indicates the new media metadata. For details, see
AVMetadatapublic void onAVQueueChanged(List<AVQueueElement> queue)
queue - Indicates the updated playback queue. For details, see
AVQueueElementpublic void onAVQueueTitleChanged(CharSequence title)
title - Indicates the new title of the playback queue