blob: a23e6301a906cd99e19ef2a0c1cb790e9bc604c0 [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.media.sessions2
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div>
## **PROTOCOLS**
## ActiveSession {#ActiveSession}
*Defined in [fuchsia.media.sessions2/discovery.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/discovery.fidl;l=184)*
<p>A protocol for watching the current active media session on the device.</p>
<p>The currently active media session is the most recent existing media session
to announce a &quot;Playing&quot; state on the local device, even if it is now paused.</p>
### WatchActiveSession {#ActiveSession.WatchActiveSession}
<p>Watches the active session. The first request will be answered immediately
with the current active session. Always leave a request hanging to receive
a reply when the active session changes.</p>
#### Request {#ActiveSession.WatchActiveSession_Request}
&lt;EMPTY&gt;
#### Response {#ActiveSession.WatchActiveSession_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>session</code></td>
<td>
<code><a class='link' href='#SessionControl'>SessionControl</a>?</code>
</td>
</tr>
</table>
## Discovery {#Discovery}
*Defined in [fuchsia.media.sessions2/discovery.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/discovery.fidl;l=146)*
<p><code>Discovery</code> observes the collection of published media sessions
and connects clients to them.</p>
### ConnectToSession {#Discovery.ConnectToSession}
<p>Connects to a <code>SessionControl</code> for <code>session_id</code> if present. Drops the
given channel otherwise.</p>
#### Request {#Discovery.ConnectToSession_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>session_id</code></td>
<td>
<code><a class='link' href='#SessionId'>SessionId</a></code>
</td>
</tr>
<tr>
<td><code>session_control_request</code></td>
<td>
<code>request&lt;<a class='link' href='#SessionControl'>SessionControl</a>&gt;</code>
</td>
</tr>
</table>
### WatchSessions {#Discovery.WatchSessions}
<p>Connects a session watcher configured with the given options.</p>
#### Request {#Discovery.WatchSessions_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>watch_options</code></td>
<td>
<code><a class='link' href='#WatchOptions'>WatchOptions</a></code>
</td>
</tr>
<tr>
<td><code>session_watcher</code></td>
<td>
<code><a class='link' href='#SessionsWatcher'>SessionsWatcher</a></code>
</td>
</tr>
</table>
## ObserverDiscovery {#ObserverDiscovery}
*Defined in [fuchsia.media.sessions2/discovery.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/discovery.fidl;l=164)*
<p><code>ObserverDiscovery</code> observes the collection of published media sessions
and connects clients to them for observation without playback controls.</p>
### ConnectToSession {#ObserverDiscovery.ConnectToSession}
<p>Connects to a <code>SessionObserver</code> for <code>session_id</code> if present. Drops the
given channel otherwise.</p>
#### Request {#ObserverDiscovery.ConnectToSession_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>session_id</code></td>
<td>
<code><a class='link' href='#SessionId'>SessionId</a></code>
</td>
</tr>
<tr>
<td><code>session_request</code></td>
<td>
<code>request&lt;<a class='link' href='#SessionObserver'>SessionObserver</a>&gt;</code>
</td>
</tr>
</table>
### WatchSessions {#ObserverDiscovery.WatchSessions}
<p>Connects a session watcher configured with the given options.</p>
#### Request {#ObserverDiscovery.WatchSessions_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>watch_options</code></td>
<td>
<code><a class='link' href='#WatchOptions'>WatchOptions</a></code>
</td>
</tr>
<tr>
<td><code>sessions_watcher</code></td>
<td>
<code><a class='link' href='#SessionsWatcher'>SessionsWatcher</a></code>
</td>
</tr>
</table>
## Player {#Player}
*Defined in [fuchsia.media.sessions2/player.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/player.fidl;l=307)*
<p><code>Player</code> is a handle for a media player. Unsupported commands are
no-ops. Consult <code>PlaybackCapabilities</code>, sent by to learn which
commands are supported.</p>
### BindVolumeControl {#Player.BindVolumeControl}
<p>Binds to the session's volume control for control and notifications. If this method is not
supported as indicated by the absence of the <code>HAS_GAIN_CONTROL</code> flag in
<code>PlayerCapabilities</code>, the channel handle passed as <code>volume_control_request</code> is closed
by the service.</p>
#### Request {#Player.BindVolumeControl_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>volume_control_request</code></td>
<td>
<code>request&lt;<a class='link' href='../fuchsia.media.audio/'>fuchsia.media.audio</a>/<a class='link' href='../fuchsia.media.audio/#VolumeControl'>VolumeControl</a>&gt;</code>
</td>
</tr>
</table>
### NextItem {#Player.NextItem}
<p>Changes media to the next item (e.g. next song in playlist). If this method is not
supported as indicated by the absence of the <code>CHANGE_TO_NEXT_ITEM</code> flag in
<code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#Player.NextItem_Request}
&lt;EMPTY&gt;
### Pause {#Player.Pause}
<p>Pauses playback and retains position in media. If this method is not supported as indicated
by the absence of the <code>PAUSE</code> flag in <code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#Player.Pause_Request}
&lt;EMPTY&gt;
### Play {#Player.Play}
<p>Plays media. If this method is not supported as indicated by the absence of the <code>PLAY</code>
flag in <code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#Player.Play_Request}
&lt;EMPTY&gt;
### PrevItem {#Player.PrevItem}
<p>Changes media to the previous item. If this method is not
supported as indicated by the absence of the <code>CHANGE_TO_PREV_ITEM</code> flag in
<code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#Player.PrevItem_Request}
&lt;EMPTY&gt;
### Seek {#Player.Seek}
<p>Seeks to a specific position in media. Implementations are free to
enter an error state if the position is out of bounds. <code>position</code>
is an offset from the beginning of the media. If this method is not supported as indicated
by the absence of the <code>SEEK</code> flag in <code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#Player.Seek_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>position</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#duration'>duration</a></code>
</td>
</tr>
</table>
### SetPlaybackRate {#Player.SetPlaybackRate}
<p>Sets the playback rate of the media. This will not change the playback mode. If this method
is not supported as indicated by the absense of the <code>SET_PLAYBACK_RATE</code> flag in
<code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#Player.SetPlaybackRate_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>playback_rate</code></td>
<td>
<code>float32</code>
</td>
</tr>
</table>
### SetRepeatMode {#Player.SetRepeatMode}
<p>Sets repeat mode to any of the supported repeat modes.
Whether this method takes effect depends on the <code>PlayerCapabilities</code> and <code>repeat_mode</code>:</p>
<ul>
<li><a class='link' href='#OFF'>OFF</a> is always supported.</li>
<li><a class='link' href='#GROUP'>GROUP</a> requires the <code>REPEAT_GROUPS</code> capability, and is otherwise ignored.</li>
<li><a class='link' href='#SINGLE'>SINGLE</a> requires the <code>REPEAT_SINGLE</code> capability, and is otherwise ignored.</li>
</ul>
#### Request {#Player.SetRepeatMode_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>repeat_mode</code></td>
<td>
<code><a class='link' href='#RepeatMode'>RepeatMode</a></code>
</td>
</tr>
</table>
### SetShuffleMode {#Player.SetShuffleMode}
<p>Sets shuffle mode. If this method is not supported as indicated by the absence of the
<code>SHUFFLE</code> flag in <code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#Player.SetShuffleMode_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>shuffle_on</code></td>
<td>
<code>bool</code>
</td>
</tr>
</table>
### SkipForward {#Player.SkipForward}
<p>Skips forward in media by the player's default skip amount. If this method is not supported
as indicated by the absence of the <code>SKIP_FORWARD</code> flag in <code>PlayerCapabilities</code>, this method
does nothing.</p>
#### Request {#Player.SkipForward_Request}
&lt;EMPTY&gt;
### SkipReverse {#Player.SkipReverse}
<p>Skips in reverse in media by the player's default skip amount. If this method is not
supported as indicated by the absence of the <code>SKIP_REVERSE</code> flag in <code>PlayerCapabilities</code>,
this method does nothing.</p>
#### Request {#Player.SkipReverse_Request}
&lt;EMPTY&gt;
### Stop {#Player.Stop}
<p>Stops playback. The session should close.</p>
#### Request {#Player.Stop_Request}
&lt;EMPTY&gt;
### WatchInfoChange {#Player.WatchInfoChange}
<p>Gets the net player info change using the hanging get pattern.</p>
#### Request {#Player.WatchInfoChange_Request}
&lt;EMPTY&gt;
#### Response {#Player.WatchInfoChange_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>player_info_delta</code></td>
<td>
<code><a class='link' href='#PlayerInfoDelta'>PlayerInfoDelta</a></code>
</td>
</tr>
</table>
## PlayerControl {#PlayerControl}
*Defined in [fuchsia.media.sessions2/player.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/player.fidl;l=24)*
<p>Controls for a media player. <code>PlayerCapabilities</code> expresses which of the methods in this
protocol are supported by the player. Because capabilties are dynamic, and a client cannot
always know what capabilities will be supported when the method call reaches the service,
calling a method that is not supported is simply ignored. In general, clients should not
expect methods to work unless the player indicates sustained support.</p>
### BindVolumeControl {#PlayerControl.BindVolumeControl}
<p>Binds to the session's volume control for control and notifications. If this method is not
supported as indicated by the absence of the <code>HAS_GAIN_CONTROL</code> flag in
<code>PlayerCapabilities</code>, the channel handle passed as <code>volume_control_request</code> is closed
by the service.</p>
#### Request {#PlayerControl.BindVolumeControl_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>volume_control_request</code></td>
<td>
<code>request&lt;<a class='link' href='../fuchsia.media.audio/'>fuchsia.media.audio</a>/<a class='link' href='../fuchsia.media.audio/#VolumeControl'>VolumeControl</a>&gt;</code>
</td>
</tr>
</table>
### NextItem {#PlayerControl.NextItem}
<p>Changes media to the next item (e.g. next song in playlist). If this method is not
supported as indicated by the absence of the <code>CHANGE_TO_NEXT_ITEM</code> flag in
<code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#PlayerControl.NextItem_Request}
&lt;EMPTY&gt;
### Pause {#PlayerControl.Pause}
<p>Pauses playback and retains position in media. If this method is not supported as indicated
by the absence of the <code>PAUSE</code> flag in <code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#PlayerControl.Pause_Request}
&lt;EMPTY&gt;
### Play {#PlayerControl.Play}
<p>Plays media. If this method is not supported as indicated by the absence of the <code>PLAY</code>
flag in <code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#PlayerControl.Play_Request}
&lt;EMPTY&gt;
### PrevItem {#PlayerControl.PrevItem}
<p>Changes media to the previous item. If this method is not
supported as indicated by the absence of the <code>CHANGE_TO_PREV_ITEM</code> flag in
<code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#PlayerControl.PrevItem_Request}
&lt;EMPTY&gt;
### Seek {#PlayerControl.Seek}
<p>Seeks to a specific position in media. Implementations are free to
enter an error state if the position is out of bounds. <code>position</code>
is an offset from the beginning of the media. If this method is not supported as indicated
by the absence of the <code>SEEK</code> flag in <code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#PlayerControl.Seek_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>position</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#duration'>duration</a></code>
</td>
</tr>
</table>
### SetPlaybackRate {#PlayerControl.SetPlaybackRate}
<p>Sets the playback rate of the media. This will not change the playback mode. If this method
is not supported as indicated by the absense of the <code>SET_PLAYBACK_RATE</code> flag in
<code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#PlayerControl.SetPlaybackRate_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>playback_rate</code></td>
<td>
<code>float32</code>
</td>
</tr>
</table>
### SetRepeatMode {#PlayerControl.SetRepeatMode}
<p>Sets repeat mode to any of the supported repeat modes.
Whether this method takes effect depends on the <code>PlayerCapabilities</code> and <code>repeat_mode</code>:</p>
<ul>
<li><a class='link' href='#OFF'>OFF</a> is always supported.</li>
<li><a class='link' href='#GROUP'>GROUP</a> requires the <code>REPEAT_GROUPS</code> capability, and is otherwise ignored.</li>
<li><a class='link' href='#SINGLE'>SINGLE</a> requires the <code>REPEAT_SINGLE</code> capability, and is otherwise ignored.</li>
</ul>
#### Request {#PlayerControl.SetRepeatMode_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>repeat_mode</code></td>
<td>
<code><a class='link' href='#RepeatMode'>RepeatMode</a></code>
</td>
</tr>
</table>
### SetShuffleMode {#PlayerControl.SetShuffleMode}
<p>Sets shuffle mode. If this method is not supported as indicated by the absence of the
<code>SHUFFLE</code> flag in <code>PlayerCapabilities</code>, this method does nothing.</p>
#### Request {#PlayerControl.SetShuffleMode_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>shuffle_on</code></td>
<td>
<code>bool</code>
</td>
</tr>
</table>
### SkipForward {#PlayerControl.SkipForward}
<p>Skips forward in media by the player's default skip amount. If this method is not supported
as indicated by the absence of the <code>SKIP_FORWARD</code> flag in <code>PlayerCapabilities</code>, this method
does nothing.</p>
#### Request {#PlayerControl.SkipForward_Request}
&lt;EMPTY&gt;
### SkipReverse {#PlayerControl.SkipReverse}
<p>Skips in reverse in media by the player's default skip amount. If this method is not
supported as indicated by the absence of the <code>SKIP_REVERSE</code> flag in <code>PlayerCapabilities</code>,
this method does nothing.</p>
#### Request {#PlayerControl.SkipReverse_Request}
&lt;EMPTY&gt;
### Stop {#PlayerControl.Stop}
<p>Stops playback. The session should close.</p>
#### Request {#PlayerControl.Stop_Request}
&lt;EMPTY&gt;
## Publisher {#Publisher}
*Defined in [fuchsia.media.sessions2/publisher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/publisher.fidl;l=23)*
<p><code>Publisher</code> publishes media players so they may be discovered and
controlled by clients who have permission to do so.</p>
### Publish {#Publisher.Publish}
#### Request {#Publisher.Publish_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>player</code></td>
<td>
<code><a class='link' href='#Player'>Player</a></code>
</td>
</tr>
<tr>
<td><code>registration</code></td>
<td>
<code><a class='link' href='#PlayerRegistration'>PlayerRegistration</a></code>
</td>
</tr>
</table>
#### Response {#Publisher.Publish_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>session_id</code></td>
<td>
<code><a class='link' href='#SessionId'>SessionId</a></code>
</td>
</tr>
</table>
## SessionControl {#SessionControl}
*Defined in [fuchsia.media.sessions2/discovery.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/discovery.fidl;l=52)*
<p>Controls a media session and views its status.</p>
<p>The channel will close if the media session is stopped.</p>
### BindVolumeControl {#SessionControl.BindVolumeControl}
<p>Binds to the session's volume control for control and notifications.</p>
#### Request {#SessionControl.BindVolumeControl_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>volume_control_request</code></td>
<td>
<code>request&lt;<a class='link' href='../fuchsia.media.audio/'>fuchsia.media.audio</a>/<a class='link' href='../fuchsia.media.audio/#VolumeControl'>VolumeControl</a>&gt;</code>
</td>
</tr>
</table>
### NextItem {#SessionControl.NextItem}
<p>Changes media to the next item (e.g. next song in playlist).</p>
#### Request {#SessionControl.NextItem_Request}
&lt;EMPTY&gt;
### Pause {#SessionControl.Pause}
<p>Pauses playback and retains position in media</p>
#### Request {#SessionControl.Pause_Request}
&lt;EMPTY&gt;
### Play {#SessionControl.Play}
<p>Plays media.</p>
#### Request {#SessionControl.Play_Request}
&lt;EMPTY&gt;
### PrevItem {#SessionControl.PrevItem}
<p>Changes media to the previous item.</p>
#### Request {#SessionControl.PrevItem_Request}
&lt;EMPTY&gt;
### Seek {#SessionControl.Seek}
<p>Seeks to a specific position in media. Implementations are free to
enter an error state if the position is out of bounds. <code>position</code>
is an offset from the beginning of the media.</p>
#### Request {#SessionControl.Seek_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>position</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#duration'>duration</a></code>
</td>
</tr>
</table>
### SetPlaybackRate {#SessionControl.SetPlaybackRate}
<p>Sets the playback rate of the media. This will not change the
playback mode.</p>
#### Request {#SessionControl.SetPlaybackRate_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>playback_rate</code></td>
<td>
<code>float32</code>
</td>
</tr>
</table>
### SetRepeatMode {#SessionControl.SetRepeatMode}
<p>Sets repeat mode to any of the supported repeat modes.</p>
#### Request {#SessionControl.SetRepeatMode_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>repeat_mode</code></td>
<td>
<code><a class='link' href='#RepeatMode'>RepeatMode</a></code>
</td>
</tr>
</table>
### SetShuffleMode {#SessionControl.SetShuffleMode}
<p>Sets shuffle mode.</p>
#### Request {#SessionControl.SetShuffleMode_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>shuffle_on</code></td>
<td>
<code>bool</code>
</td>
</tr>
</table>
### SkipForward {#SessionControl.SkipForward}
<p>Skips forward in media by the player's default skip amount.</p>
#### Request {#SessionControl.SkipForward_Request}
&lt;EMPTY&gt;
### SkipReverse {#SessionControl.SkipReverse}
<p>Skips in reverse in media by the player's default skip amount.</p>
#### Request {#SessionControl.SkipReverse_Request}
&lt;EMPTY&gt;
### Stop {#SessionControl.Stop}
<p>Stops playback. The session should close.</p>
#### Request {#SessionControl.Stop_Request}
&lt;EMPTY&gt;
### WatchStatus {#SessionControl.WatchStatus}
<p>Watches the session status. Leave a request hanging to receive a reply when
the session status changes. The first request will be answered immediately with
the current state.</p>
#### Request {#SessionControl.WatchStatus_Request}
&lt;EMPTY&gt;
#### Response {#SessionControl.WatchStatus_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>session_info_delta</code></td>
<td>
<code><a class='link' href='#SessionInfoDelta'>SessionInfoDelta</a></code>
</td>
</tr>
</table>
## SessionObserver {#SessionObserver}
*Defined in [fuchsia.media.sessions2/discovery.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/discovery.fidl;l=101)*
<p>Views a media session's status.</p>
<p>The channel will close if the media session is stopped.</p>
### WatchStatus {#SessionObserver.WatchStatus}
<p>Watches the session status. Leave a request hanging to receive a reply when
the session status changes. The first request will be answered immediately with
the current state.</p>
#### Request {#SessionObserver.WatchStatus_Request}
&lt;EMPTY&gt;
#### Response {#SessionObserver.WatchStatus_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>session_info_delta</code></td>
<td>
<code><a class='link' href='#SessionInfoDelta'>SessionInfoDelta</a></code>
</td>
</tr>
</table>
## SessionsWatcher {#SessionsWatcher}
*Defined in [fuchsia.media.sessions2/discovery.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/discovery.fidl;l=121)*
<p><code>SessionsWatcher</code> watches the collection of published sessions.</p>
### SessionRemoved {#SessionsWatcher.SessionRemoved}
<p>Called by the registry service when a session is removed from the registered
collection.</p>
<p><code>SessionsWatcher</code> must reply to acknlowledge receipt of the session removal.
Delinquent watchers who do not reply will eventually be disconnected.</p>
#### Request {#SessionsWatcher.SessionRemoved_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>session_id</code></td>
<td>
<code><a class='link' href='#SessionId'>SessionId</a></code>
</td>
</tr>
</table>
#### Response {#SessionsWatcher.SessionRemoved_Response}
&lt;EMPTY&gt;
### SessionUpdated {#SessionsWatcher.SessionUpdated}
<p>Called by the registry service when a session is updated. On first connection,
this will be called as many times as needed to communicate the state of the
world.</p>
<p><code>SessionsWatcher</code> must reply to acknowledge receipt of the session info delta.
Delinquent watchers who do not reply will eventually be disconnected.</p>
#### Request {#SessionsWatcher.SessionUpdated_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>session_id</code></td>
<td>
<code><a class='link' href='#SessionId'>SessionId</a></code>
</td>
</tr>
<tr>
<td><code>session_info_delta</code></td>
<td>
<code><a class='link' href='#SessionInfoDelta'>SessionInfoDelta</a></code>
</td>
</tr>
</table>
#### Response {#SessionsWatcher.SessionUpdated_Response}
&lt;EMPTY&gt;
## **STRUCTS**
### ImageSizeVariant {#ImageSizeVariant data-text="ImageSizeVariant"}
*Defined in [fuchsia.media.sessions2/images.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/images.fidl;l=17)*
<p>A variant of an image at a specific size.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="ImageSizeVariant.url">
<td><code>url</code></td>
<td>
<code><a class='link' href='../fuchsia.url/'>fuchsia.url</a>/<a class='link' href='../fuchsia.url/#Url'>Url</a></code>
</td>
<td></td>
<td>No default</td>
</tr>
<tr id="ImageSizeVariant.width">
<td><code>width</code></td>
<td>
<code>uint32</code>
</td>
<td></td>
<td>No default</td>
</tr>
<tr id="ImageSizeVariant.height">
<td><code>height</code></td>
<td>
<code>uint32</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
## **ENUMS**
### ContentType [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ContentType data-text="ContentType"}
Type: <code>uint32</code>
*Defined in [fuchsia.media.sessions2/player.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/player.fidl;l=97)*
<p>The type of content playing back, which should be set to the largest
applicable value.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="ContentType.OTHER">
<td><h3 id="ContentType.OTHER" class="add-link hide-from-toc">OTHER</h3></td>
<td><code>1</code></td>
<td><p>Content does not qualify for any of the other values.</p>
</td>
</tr>
<tr id="ContentType.AUDIO">
<td><h3 id="ContentType.AUDIO" class="add-link hide-from-toc">AUDIO</h3></td>
<td><code>2</code></td>
<td><p>Audio-only content that does not qualify as music.</p>
</td>
</tr>
<tr id="ContentType.VIDEO">
<td><h3 id="ContentType.VIDEO" class="add-link hide-from-toc">VIDEO</h3></td>
<td><code>3</code></td>
<td><p>Video-only or audio-video content that does not qualify as a TV show or a movie.</p>
</td>
</tr>
<tr id="ContentType.MUSIC">
<td><h3 id="ContentType.MUSIC" class="add-link hide-from-toc">MUSIC</h3></td>
<td><code>4</code></td>
<td><p>Audio-only content generally recognized as music.</p>
</td>
</tr>
<tr id="ContentType.TV_SHOW">
<td><h3 id="ContentType.TV_SHOW" class="add-link hide-from-toc">TV_SHOW</h3></td>
<td><code>5</code></td>
<td><p>Audio-video content that is part of a television or streaming series.</p>
</td>
</tr>
<tr id="ContentType.MOVIE">
<td><h3 id="ContentType.MOVIE" class="add-link hide-from-toc">MOVIE</h3></td>
<td><code>6</code></td>
<td><p>Audio-video content consisting of a feature film.</p>
</td>
</tr>
</table>
### Error [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Error data-text="Error"}
Type: <code>uint32</code>
*Defined in [fuchsia.media.sessions2/player.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/player.fidl;l=184)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="Error.OTHER">
<td><h3 id="Error.OTHER" class="add-link hide-from-toc">OTHER</h3></td>
<td><code>1</code></td>
<td></td>
</tr>
</table>
### InterruptionBehavior [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#InterruptionBehavior data-text="InterruptionBehavior"}
Type: <code>uint32</code>
*Defined in [fuchsia.media.sessions2/player.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/player.fidl;l=251)*
<p>The behavior enforced on the player when it is
interrupted, such as by an alarm.</p>
<p>Interruptions are detected using the player's usage.</p>
<p>By default the interruption behavior is <code>NONE</code>.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="InterruptionBehavior.NONE">
<td><h3 id="InterruptionBehavior.NONE" class="add-link hide-from-toc">NONE</h3></td>
<td><code>0</code></td>
<td><p>Interruptions have no effect on the player
and it may continue in spite of reduced audibility.</p>
</td>
</tr>
<tr id="InterruptionBehavior.PAUSE">
<td><h3 id="InterruptionBehavior.PAUSE" class="add-link hide-from-toc">PAUSE</h3></td>
<td><code>1</code></td>
<td><p>With this behavior, when playback is interrupted, the player
will be paused until the interruption is over, so the user
does not miss any content.</p>
</td>
</tr>
</table>
### MediaImageType [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#MediaImageType data-text="MediaImageType"}
Type: <code>uint32</code>
*Defined in [fuchsia.media.sessions2/images.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/images.fidl;l=8)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="MediaImageType.ARTWORK">
<td><h3 id="MediaImageType.ARTWORK" class="add-link hide-from-toc">ARTWORK</h3></td>
<td><code>0</code></td>
<td><p>Artwork for the playing media.</p>
</td>
</tr>
<tr id="MediaImageType.SOURCE_ICON">
<td><h3 id="MediaImageType.SOURCE_ICON" class="add-link hide-from-toc">SOURCE_ICON</h3></td>
<td><code>1</code></td>
<td><p>An icon for the source of the playing media (e.g. the player or
streaming service).</p>
</td>
</tr>
</table>
### PlayerState [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#PlayerState data-text="PlayerState"}
Type: <code>uint32</code>
*Defined in [fuchsia.media.sessions2/player.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/player.fidl;l=166)*
<p>State of a media player.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="PlayerState.IDLE">
<td><h3 id="PlayerState.IDLE" class="add-link hide-from-toc">IDLE</h3></td>
<td><code>0</code></td>
<td><p>The initial state of a session if there is no associated media.</p>
</td>
</tr>
<tr id="PlayerState.PLAYING">
<td><h3 id="PlayerState.PLAYING" class="add-link hide-from-toc">PLAYING</h3></td>
<td><code>1</code></td>
<td><p>The player is playing.</p>
</td>
</tr>
<tr id="PlayerState.PAUSED">
<td><h3 id="PlayerState.PAUSED" class="add-link hide-from-toc">PAUSED</h3></td>
<td><code>2</code></td>
<td><p>The player is paused.</p>
</td>
</tr>
<tr id="PlayerState.BUFFERING">
<td><h3 id="PlayerState.BUFFERING" class="add-link hide-from-toc">BUFFERING</h3></td>
<td><code>3</code></td>
<td><p>The player would be playing, but is temporarily paused for buffering.</p>
</td>
</tr>
<tr id="PlayerState.ERROR">
<td><h3 id="PlayerState.ERROR" class="add-link hide-from-toc">ERROR</h3></td>
<td><code>4</code></td>
<td><p>The player cannot recover from this state and will close.</p>
</td>
</tr>
</table>
### RepeatMode [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#RepeatMode data-text="RepeatMode"}
Type: <code>uint32</code>
*Defined in [fuchsia.media.sessions2/player.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/player.fidl;l=189)*
<p>Modes of repeating playback of the current media.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="RepeatMode.OFF">
<td><h3 id="RepeatMode.OFF" class="add-link hide-from-toc">OFF</h3></td>
<td><code>0</code></td>
<td><p>No repeat.</p>
</td>
</tr>
<tr id="RepeatMode.GROUP">
<td><h3 id="RepeatMode.GROUP" class="add-link hide-from-toc">GROUP</h3></td>
<td><code>1</code></td>
<td><p>Repeat the relevant group of media (e.g. playlist).</p>
</td>
</tr>
<tr id="RepeatMode.SINGLE">
<td><h3 id="RepeatMode.SINGLE" class="add-link hide-from-toc">SINGLE</h3></td>
<td><code>2</code></td>
<td><p>Repeat the currently playing media.</p>
</td>
</tr>
</table>
## **TABLES**
### MediaImage {#MediaImage data-text="MediaImage"}
*Defined in [fuchsia.media.sessions2/images.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/images.fidl;l=24)*
<p>An image for playing media.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="MediaImage.image_type">
<td><h3 id="MediaImage.image_type" class="add-link hide-from-toc">1</h3></td>
<td><code>image_type</code></td>
<td>
<code><a class='link' href='#MediaImageType'>MediaImageType</a></code>
</td>
<td></td>
</tr>
<tr id="MediaImage.sizes">
<td><h3 id="MediaImage.sizes" class="add-link hide-from-toc">2</h3></td>
<td><code>sizes</code></td>
<td>
<code>vector&lt;<a class='link' href='#ImageSizeVariant'>ImageSizeVariant</a>&gt;[16]</code>
</td>
<td><p>Available variants of the image.</p>
</td>
</tr>
</table>
### PlayerCapabilities {#PlayerCapabilities data-text="PlayerCapabilities"}
*Defined in [fuchsia.media.sessions2/player.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/player.fidl;l=239)*
<p>Describes the capabilities of a player.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="PlayerCapabilities.flags">
<td><h3 id="PlayerCapabilities.flags" class="add-link hide-from-toc">1</h3></td>
<td><code>flags</code></td>
<td>
<code><a class='link' href='#PlayerCapabilityFlags'>PlayerCapabilityFlags</a></code>
</td>
<td><p>Indicates which capabilities are supported by the player. See <code>PlayerControl</code> for
details.</p>
</td>
</tr>
</table>
### PlayerInfoDelta {#PlayerInfoDelta data-text="PlayerInfoDelta"}
*Defined in [fuchsia.media.sessions2/player.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/player.fidl;l=264)*
<p>When emitted, fields that have changed should be set.
The first emission to a new client should be a snapshot.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="PlayerInfoDelta.local">
<td><h3 id="PlayerInfoDelta.local" class="add-link hide-from-toc">1</h3></td>
<td><code>local</code></td>
<td>
<code>bool</code>
</td>
<td><p>Whether the entry point for the media into our device network is the
local machine; this should be true if this is the device streaming
from a music service, but false or omitted if this machine is just
receiving an audio stream to act as a speaker.</p>
<p>If omitted, the value is unchanged. Initially, this value is <code>true</code>.</p>
</td>
</tr>
<tr id="PlayerInfoDelta.player_status">
<td><h3 id="PlayerInfoDelta.player_status" class="add-link hide-from-toc">2</h3></td>
<td><code>player_status</code></td>
<td>
<code><a class='link' href='#PlayerStatus'>PlayerStatus</a></code>
</td>
<td><p>The status of the player.</p>
<p>If omitted, all constituent values are unchanged. If a field within <code>PlayerStatus</code> is
omitted, its value is unchanged. Initial values are indicated for each field in
<code>player_status</code>.</p>
</td>
</tr>
<tr id="PlayerInfoDelta.metadata">
<td><h3 id="PlayerInfoDelta.metadata" class="add-link hide-from-toc">3</h3></td>
<td><code>metadata</code></td>
<td>
<code><a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#Metadata'>Metadata</a></code>
</td>
<td><p>The metadata of the playing media.</p>
<p>If omitted, the metadata is unchanged. Initially, there is no metadata.</p>
</td>
</tr>
<tr id="PlayerInfoDelta.media_images">
<td><h3 id="PlayerInfoDelta.media_images" class="add-link hide-from-toc">4</h3></td>
<td><code>media_images</code></td>
<td>
<code>vector&lt;<a class='link' href='#MediaImage'>MediaImage</a>&gt;[16]</code>
</td>
<td><p>The images associated with the playing media.</p>
<p>If omitted, the media images are unchanged. An empty
vector indicates that there are no media images, which is also the initial state.</p>
</td>
</tr>
<tr id="PlayerInfoDelta.player_capabilities">
<td><h3 id="PlayerInfoDelta.player_capabilities" class="add-link hide-from-toc">5</h3></td>
<td><code>player_capabilities</code></td>
<td>
<code><a class='link' href='#PlayerCapabilities'>PlayerCapabilities</a></code>
</td>
<td><p>The capabilities of the player.</p>
<p>If omitted, the capabilities are unchanged. Initially, the player is assumed to have no
capabilities.</p>
</td>
</tr>
<tr id="PlayerInfoDelta.interruption_behavior">
<td><h3 id="PlayerInfoDelta.interruption_behavior" class="add-link hide-from-toc">6</h3></td>
<td><code>interruption_behavior</code></td>
<td>
<code><a class='link' href='#InterruptionBehavior'>InterruptionBehavior</a></code>
</td>
<td><p>The behavior the player would like to engage in when interrupted
by something, such as an alarm.</p>
<p>If omitted, the behavior is unchanged. Initially, the value is <code>NONE</code>.</p>
</td>
</tr>
</table>
### PlayerRegistration {#PlayerRegistration data-text="PlayerRegistration"}
*Defined in [fuchsia.media.sessions2/publisher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/publisher.fidl;l=11)*
<p>All information required by the media session registry service to
register a player so that clients may observe its status and control
it.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="PlayerRegistration.domain">
<td><h3 id="PlayerRegistration.domain" class="add-link hide-from-toc">1</h3></td>
<td><code>domain</code></td>
<td>
<code><a class='link' href='#Domain'>Domain</a></code>
</td>
<td><p>The domain on which the player exists. Unset if it is the native
Fuchsia domain.</p>
</td>
</tr>
<tr id="PlayerRegistration.usage">
<td><h3 id="PlayerRegistration.usage" class="add-link hide-from-toc">2</h3></td>
<td><code>usage</code></td>
<td>
<code><a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#AudioRenderUsage'>AudioRenderUsage</a></code>
</td>
<td><p>The usage of the player's audio output. By default, this is assumed
to be MEDIA.</p>
</td>
</tr>
</table>
### PlayerStatus {#PlayerStatus data-text="PlayerStatus"}
*Defined in [fuchsia.media.sessions2/player.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/player.fidl;l=119)*
<p>Status of a media player.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="PlayerStatus.duration">
<td><h3 id="PlayerStatus.duration" class="add-link hide-from-toc">1</h3></td>
<td><code>duration</code></td>
<td>
<code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#duration'>duration</a></code>
</td>
<td><p>Total duration of playing media.</p>
<p>If this value is omitted, the duration is unknown, not applicable or unchanged. Initially,
the duration is assumed to be unknown.</p>
</td>
</tr>
<tr id="PlayerStatus.is_live">
<td><h3 id="PlayerStatus.is_live" class="add-link hide-from-toc">8</h3></td>
<td><code>is_live</code></td>
<td>
<code>bool</code>
</td>
<td><p>Whether the playing media is live (such as television or a live stream).</p>
<p>If this field is omitted, the value is unchanged. Initially, the value is false.</p>
</td>
</tr>
<tr id="PlayerStatus.player_state">
<td><h3 id="PlayerStatus.player_state" class="add-link hide-from-toc">2</h3></td>
<td><code>player_state</code></td>
<td>
<code><a class='link' href='#PlayerState'>PlayerState</a></code>
</td>
<td><p>State of the player.</p>
<p>If this field is omitted, the value is unchanged. Initially, the value is <code>IDLE</code>.</p>
</td>
</tr>
<tr id="PlayerStatus.timeline_function">
<td><h3 id="PlayerStatus.timeline_function" class="add-link hide-from-toc">3</h3></td>
<td><code>timeline_function</code></td>
<td>
<code><a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#TimelineFunction'>TimelineFunction</a></code>
</td>
<td><p>A playback function that describes the position and rate of
play through the media as a function of <code>CLOCK_MONOTONIC</code>.</p>
<p>If this field is omitted, the value is unchanged. Initially, <code>reference_delta</code> is 1 and
the remaining constituent fields are 0.</p>
</td>
</tr>
<tr id="PlayerStatus.repeat_mode">
<td><h3 id="PlayerStatus.repeat_mode" class="add-link hide-from-toc">4</h3></td>
<td><code>repeat_mode</code></td>
<td>
<code><a class='link' href='#RepeatMode'>RepeatMode</a></code>
</td>
<td><p>Repeat mode of the player.</p>
<p>If this field is omitted, the value is unchanged. Initially, the value is <code>NONE</code>.</p>
</td>
</tr>
<tr id="PlayerStatus.shuffle_on">
<td><h3 id="PlayerStatus.shuffle_on" class="add-link hide-from-toc">5</h3></td>
<td><code>shuffle_on</code></td>
<td>
<code>bool</code>
</td>
<td><p>Shuffle mode of the player.</p>
<p>If this field is omitted, the value is unchanged. Initially, the value is false.</p>
</td>
</tr>
<tr id="PlayerStatus.content_type">
<td><h3 id="PlayerStatus.content_type" class="add-link hide-from-toc">6</h3></td>
<td><code>content_type</code></td>
<td>
<code><a class='link' href='#ContentType'>ContentType</a></code>
</td>
<td><p>The type of content playing back.</p>
<p>If this field is omitted, the value is unchanged. Initially, the value is <code>OTHER</code>.</p>
</td>
</tr>
<tr id="PlayerStatus.error">
<td><h3 id="PlayerStatus.error" class="add-link hide-from-toc">7</h3></td>
<td><code>error</code></td>
<td>
<code><a class='link' href='#Error'>Error</a></code>
</td>
<td><p>An error the player may have encountered.</p>
<p>This field is omitted unless there is an error. Once an error is indicated, it cannot
be rescinded.</p>
</td>
</tr>
</table>
### SessionInfoDelta {#SessionInfoDelta data-text="SessionInfoDelta"}
*Defined in [fuchsia.media.sessions2/discovery.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/discovery.fidl;l=13)*
<p>SessionInfoDelta holds a description of a media session.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="SessionInfoDelta.domain">
<td><h3 id="SessionInfoDelta.domain" class="add-link hide-from-toc">1</h3></td>
<td><code>domain</code></td>
<td>
<code><a class='link' href='#Domain'>Domain</a></code>
</td>
<td><p>The domain on which the session takes place. A domain identifies a set of
mutually compatible media targets and sessions; sessions on a domain may
be played back on targets of the same domain.</p>
<p>This field is always present.</p>
</td>
</tr>
<tr id="SessionInfoDelta.is_local">
<td><h3 id="SessionInfoDelta.is_local" class="add-link hide-from-toc">2</h3></td>
<td><code>is_local</code></td>
<td>
<code>bool</code>
</td>
<td><p>Whether the source of the media playback is on this device.</p>
<p>This field is present only if known.</p>
</td>
</tr>
<tr id="SessionInfoDelta.is_locally_active">
<td><h3 id="SessionInfoDelta.is_locally_active" class="add-link hide-from-toc">3</h3></td>
<td><code>is_locally_active</code></td>
<td>
<code>bool</code>
</td>
<td><p>If this is <code>true</code>, the playback is taking place local to the device.
Playing on the device speaker is local, playing on a remote speaker
is not. This is only set when the session is playing back; a paused
session is not active.</p>
<p>This field is always present.</p>
</td>
</tr>
<tr id="SessionInfoDelta.player_status">
<td><h3 id="SessionInfoDelta.player_status" class="add-link hide-from-toc">4</h3></td>
<td><code>player_status</code></td>
<td>
<code><a class='link' href='#PlayerStatus'>PlayerStatus</a></code>
</td>
<td><p>The status of the player.</p>
<p>This field is always present.</p>
</td>
</tr>
<tr id="SessionInfoDelta.metadata">
<td><h3 id="SessionInfoDelta.metadata" class="add-link hide-from-toc">5</h3></td>
<td><code>metadata</code></td>
<td>
<code><a class='link' href='../fuchsia.media/'>fuchsia.media</a>/<a class='link' href='../fuchsia.media/#Metadata'>Metadata</a></code>
</td>
<td><p>Metadata describing the media session.</p>
<p>This field is always present.</p>
</td>
</tr>
<tr id="SessionInfoDelta.media_images">
<td><h3 id="SessionInfoDelta.media_images" class="add-link hide-from-toc">6</h3></td>
<td><code>media_images</code></td>
<td>
<code>vector&lt;<a class='link' href='#MediaImage'>MediaImage</a>&gt;</code>
</td>
<td><p>Images associated with the media or its source.</p>
<p>This field is always present.</p>
</td>
</tr>
<tr id="SessionInfoDelta.player_capabilities">
<td><h3 id="SessionInfoDelta.player_capabilities" class="add-link hide-from-toc">7</h3></td>
<td><code>player_capabilities</code></td>
<td>
<code><a class='link' href='#PlayerCapabilities'>PlayerCapabilities</a></code>
</td>
<td><p>The capabilities the player of the media implements.</p>
<p>This field is always present.</p>
</td>
</tr>
</table>
### WatchOptions {#WatchOptions data-text="WatchOptions"}
*Defined in [fuchsia.media.sessions2/discovery.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/discovery.fidl;l=113)*
<p>Options that specify which sessions are watched when watching the collection.</p>
<p>The watched set is the set of sessions which satisfies all options.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="WatchOptions.only_active">
<td><h3 id="WatchOptions.only_active" class="add-link hide-from-toc">1</h3></td>
<td><code>only_active</code></td>
<td>
<code>bool</code>
</td>
<td><p>Watch only the active session. Watches all if not set.</p>
</td>
</tr>
<tr id="WatchOptions.allowed_sessions">
<td><h3 id="WatchOptions.allowed_sessions" class="add-link hide-from-toc">2</h3></td>
<td><code>allowed_sessions</code></td>
<td>
<code>vector&lt;uint64&gt;[1000]</code>
</td>
<td><p>Watch only sessions with these allowlisted ids. Watches all if not set.</p>
</td>
</tr>
</table>
## **BITS**
### PlayerCapabilityFlags [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#PlayerCapabilityFlags}
Type: <code>uint32</code>
*Defined in [fuchsia.media.sessions2/player.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/player.fidl;l=200)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="PlayerCapabilityFlags.PLAY">
<td><h3 id="PlayerCapabilityFlags.PLAY" class="add-link hide-from-toc">PLAY</h3></td>
<td>1</td>
<td><p>If set, the player can <code>Play()</code>.</p>
</td>
</tr>
<tr id="PlayerCapabilityFlags.PAUSE">
<td><h3 id="PlayerCapabilityFlags.PAUSE" class="add-link hide-from-toc">PAUSE</h3></td>
<td>4</td>
<td><p>If set, the player can <code>Pause()</code>.</p>
</td>
</tr>
<tr id="PlayerCapabilityFlags.SEEK">
<td><h3 id="PlayerCapabilityFlags.SEEK" class="add-link hide-from-toc">SEEK</h3></td>
<td>8</td>
<td><p>If set, the player can <code>Seek()</code>.</p>
</td>
</tr>
<tr id="PlayerCapabilityFlags.SKIP_FORWARD">
<td><h3 id="PlayerCapabilityFlags.SKIP_FORWARD" class="add-link hide-from-toc">SKIP_FORWARD</h3></td>
<td>16</td>
<td><p>If set, the player can <code>SkipForward()</code>.</p>
</td>
</tr>
<tr id="PlayerCapabilityFlags.SKIP_REVERSE">
<td><h3 id="PlayerCapabilityFlags.SKIP_REVERSE" class="add-link hide-from-toc">SKIP_REVERSE</h3></td>
<td>32</td>
<td><p>If set, the player can <code>SkipReverse()</code>.</p>
</td>
</tr>
<tr id="PlayerCapabilityFlags.SHUFFLE">
<td><h3 id="PlayerCapabilityFlags.SHUFFLE" class="add-link hide-from-toc">SHUFFLE</h3></td>
<td>64</td>
<td><p>If set, the player can shuffle media.</p>
</td>
</tr>
<tr id="PlayerCapabilityFlags.CHANGE_TO_NEXT_ITEM">
<td><h3 id="PlayerCapabilityFlags.CHANGE_TO_NEXT_ITEM" class="add-link hide-from-toc">CHANGE_TO_NEXT_ITEM</h3></td>
<td>128</td>
<td></td>
</tr>
<tr id="PlayerCapabilityFlags.CHANGE_TO_PREV_ITEM">
<td><h3 id="PlayerCapabilityFlags.CHANGE_TO_PREV_ITEM" class="add-link hide-from-toc">CHANGE_TO_PREV_ITEM</h3></td>
<td>256</td>
<td></td>
</tr>
<tr id="PlayerCapabilityFlags.HAS_GAIN_CONTROL">
<td><h3 id="PlayerCapabilityFlags.HAS_GAIN_CONTROL" class="add-link hide-from-toc">HAS_GAIN_CONTROL</h3></td>
<td>512</td>
<td><p>If set, the player can <code>BindGainControl()</code>.</p>
</td>
</tr>
<tr id="PlayerCapabilityFlags.REPEAT_GROUPS">
<td><h3 id="PlayerCapabilityFlags.REPEAT_GROUPS" class="add-link hide-from-toc">REPEAT_GROUPS</h3></td>
<td>1024</td>
<td><p>If set, the player can repeat groups.</p>
</td>
</tr>
<tr id="PlayerCapabilityFlags.REPEAT_SINGLE">
<td><h3 id="PlayerCapabilityFlags.REPEAT_SINGLE" class="add-link hide-from-toc">REPEAT_SINGLE</h3></td>
<td>2048</td>
<td><p>If set, the player can repeat single media items.</p>
</td>
</tr>
<tr id="PlayerCapabilityFlags.SET_PLAYBACK_RATE">
<td><h3 id="PlayerCapabilityFlags.SET_PLAYBACK_RATE" class="add-link hide-from-toc">SET_PLAYBACK_RATE</h3></td>
<td>4096</td>
<td><p>If set, the player can accept playback rate changes.</p>
</td>
</tr>
</table>
## **TYPE ALIASES**
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="Domain">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/player.fidl;l=17">Domain</a></td>
<td>
<code>string</code>[<code>1000</code>]</td>
<td><p>A domain identifies the ecosystem in which the session takes place.</p>
<p>Domains should take the form of</p>
<pre><code>`domain://&lt;unique name for protocol&gt;.version`
</code></pre>
<p>The <code>|</code> symbol is reserved and should not be used in a domain string.</p>
</td>
</tr>
<tr id="SessionId">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.media.sessions2/discovery.fidl;l=10">SessionId</a></td>
<td>
<code>uint64</code></td>
<td></td>
</tr>
</table>