summaryrefslogtreecommitdiffstats
path: root/chromium/services/media_session/public/mojom/media_controller.mojom
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/services/media_session/public/mojom/media_controller.mojom')
-rw-r--r--chromium/services/media_session/public/mojom/media_controller.mojom21
1 files changed, 20 insertions, 1 deletions
diff --git a/chromium/services/media_session/public/mojom/media_controller.mojom b/chromium/services/media_session/public/mojom/media_controller.mojom
index 07a854b3966..2aa9af7b738 100644
--- a/chromium/services/media_session/public/mojom/media_controller.mojom
+++ b/chromium/services/media_session/public/mojom/media_controller.mojom
@@ -40,7 +40,7 @@ interface MediaController {
// Adds an observer that will forward events from the active media session.
// If the active session changes then observers do not need to be readded.
// Adding the observer will update the observer with the latest state.
- AddObserver(MediaSessionObserver observer);
+ AddObserver(MediaControllerObserver observer);
// Skip to the previous track. If there is no previous track then this will be
// a no-op.
@@ -57,3 +57,22 @@ interface MediaController {
// few seconds.
Seek(mojo_base.mojom.TimeDelta seek_time);
};
+
+// The observer for observing media controller events. This is different to a
+// MediaSessionObserver because a media controller can have nullable session
+// info which will be null if it is not bound to a media session. This would
+// be invalid for a media session because it must always have some state.
+interface MediaControllerObserver {
+ // Called when the state of the bound media session changes. If |info| is
+ // empty then the controller is no longer bound to a media session.
+ MediaSessionInfoChanged(MediaSessionInfo? info);
+
+ // Called when the bound media session has changed metadata. If |metadata|
+ // is null then it can be reset, e.g. the media that ws being played has
+ // been stopped.
+ MediaSessionMetadataChanged(MediaMetadata? metadata);
+
+ // Called when the bound media session action list has changed. This tells
+ // the observer which actions can be used to control the session.
+ MediaSessionActionsChanged(array<MediaSessionAction> action);
+};