Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,10 @@ platform UI or media keys, thereby improving the user experience.
the action's intent is to open the media session in a
picture-in-picture window.
</li>
<li>
<dfn enum-value for=MediaSessionAction>enterfullscreen</dfn>:
the action's intent is to open the media session in fullscreen.
</li>
<li>
<dfn enum-value for=MediaSessionAction>voiceactivity</dfn>: the
action's intent is to notify the web page that voice activity has been
Expand Down Expand Up @@ -764,6 +768,7 @@ enum MediaSessionAction {
"previousslide",
"nextslide",
"enterpictureinpicture",
"enterfullscreen",
"voiceactivity"
};

Expand Down Expand Up @@ -1871,7 +1876,16 @@ media session</a>.
Handling picture-in-picture:
<pre class="lang-javascript">
navigator.mediaSession.setActionHandler("enterpictureinpicture", function() {
remoteVideo.requestPictureInPicture();
video.requestPictureInPicture();
});
</pre>
</div>

<div class="example" id="example-enterfullscreen">
Handling enter fullscreen:
<pre class="lang-javascript">
navigator.mediaSession.setActionHandler("enterfullscreen", function() {
video.requestFullscreen();
});
</pre>
</div>
Expand Down