Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(825)

Unified Diff: third_party/WebKit/Source/modules/mediasession/MediaSession.idl

Issue 2583463002: [MediaSession] Add playbackState attribute to Blink MediaSession and use it to determine playback s… (Closed)
Patch Set: rebased Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/mediasession/MediaSession.idl
diff --git a/third_party/WebKit/Source/modules/mediasession/MediaSession.idl b/third_party/WebKit/Source/modules/mediasession/MediaSession.idl
index aacbeb4223e8f06a81ac835e35147b81c666e9f2..bd294bc66219ff71c5da36e1c4a47ee394748293 100644
--- a/third_party/WebKit/Source/modules/mediasession/MediaSession.idl
+++ b/third_party/WebKit/Source/modules/mediasession/MediaSession.idl
@@ -2,6 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// https://wicg.github.io/mediasession/#enumdef-mediasessionplaybackstate
+
+enum MediaSessionPlaybackState {
+ "none",
+ "paused",
+ "playing"
+};
+
// https://wicg.github.io/mediasession/#the-mediasession-interface
[
@@ -9,9 +17,10 @@
] interface MediaSession : EventTarget {
attribute MediaMetadata? metadata;
+ attribute MediaSessionPlaybackState playbackState;
+
attribute EventHandler onplay;
attribute EventHandler onpause;
- attribute EventHandler onplaypause;
attribute EventHandler onprevioustrack;
attribute EventHandler onnexttrack;
attribute EventHandler onseekforward;

Powered by Google App Engine
This is Rietveld 408576698