Skip to content

Commit

Permalink
Merge pull request #313 from w3c/issue-223-codec-switching
Browse files Browse the repository at this point in the history
Address remote playback issues.
  • Loading branch information
markafoltz authored Jan 22, 2024
2 parents 11a21a8 + f064b9c commit 58e109c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
30 changes: 17 additions & 13 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1114,8 +1114,6 @@ particular URL or set of URLs, the controller may send a
:: A list of [=media resources=], the same as specified in the
[=remote-playback-start-request=] message. Must not be empty.

Issue(146): Remote Playback HTTP headers.

: headers
:: headers that the receiver should use to fetch the
urls. For example,
Expand Down Expand Up @@ -1173,12 +1171,13 @@ values:
Note: A version 4 (pseudorandom) [=UUID=] is recommended as it meets the
requirements for a remote-playback-id.

: sources
: sources (optional)
:: The [=media resources=] that the controller has selected for playback
on the receiver. Each source must include a <{source/src|source URL}>
and should include an <{source/type|extended MIME type}>.

Issue(265): Should media resource URLs be optional?
and should include an <{source/type|extended MIME type}> when available
for the [=media resource=]. If `sources` is missing or empty, the
`remoting` field must be populated, as the controller will use a
streaming session to send encoded media.

: text-track-urls
:: URLs of text tracks associated with the [=media resources=].
Expand All @@ -1194,6 +1193,7 @@ Issue(265): Should media resource URLs be optional?
: remoting (optional)
:: Parameters for starting a streaming session associated with this
remote playback. If not included, no streaming session is started.
Required when `sources` is missing or empty.

When the receiver receives a [=remote-playback-start-request=] message, it should
send back a [=remote-playback-start-response=] message. It should do so quickly,
Expand Down Expand Up @@ -1342,13 +1342,12 @@ present control value indicates the change defined below. These controls
intentionally mirror settable attributes and methods of the
{{HTMLMediaElement}}.

: source-url
:: Change the [=media resource=] URL. See
: source
:: Change the [=media resource=]. See
{{HTMLMediaElement/src|HTMLMediaElement.src}}
for more details. Must not be used in the initial controls of the
[=remote-playback-start-request=] message (which already contains a list of URLs).

Issue(223): Codec switching when remoting.
[=remote-playback-start-request=] message (which already contains a
[=media resource=]).

: preload
:: Set how aggressively to preload media. See
Expand Down Expand Up @@ -1473,8 +1472,8 @@ changed.
The default is empty (support for nothing)
for the initial state in the [=remote-playback-start-response=] message.

: source-url
:: The current [=media resource=] URL. See
: source
:: The current [=media resource=]. See
{{HTMLMediaElement/currentSrc|HTMLMediaElement.currentSrc}}.
Must be present in the initial state in the [=remote-playback-start-response=] message
so the controller knows what [=media resource=] was selected for playback.
Expand Down Expand Up @@ -1996,6 +1995,11 @@ a [=streaming-session-modify-request=], it should send back a
application of the new request from the
[=streaming-session-modify-request=] was successful.

NOTE: If the sender wishes to send an encoding other than the one selected by
the receiver in a [=streaming-session-start-response=] or
[=streaming-session-modify-request=], it must terminate the current session
and start a new session.

Finally, the sender may terminate the streaming session by sending
a [=streaming-session-terminate-request=] command. When the receiver
receives the [=streaming-session-terminate-request=], it should send back
Expand Down
6 changes: 3 additions & 3 deletions messages_appendix.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ remote-playback-availability-event = {
remote-playback-start-request = {
request
1: remote-playback-id ; remote-playback-id
2: [* remote-playback-source] ; sources
? 2: [* remote-playback-source] ; sources
? 3: [* text] ; text-track-urls
? 4: [* http-header] ; headers
? 5: remote-playback-controls ; controls
Expand Down Expand Up @@ -337,7 +337,7 @@ remote-playback-state-event = {
remote-playback-id = uint

remote-playback-controls = {
? 1: text ; source-url
? 1: remote-playback-source ; source
? 2: &(none, metadata, auto) ; preload
? 3: bool ; loop
? 4: bool ; paused
Expand All @@ -360,7 +360,7 @@ remote-playback-state = {
added-text-track:
bool,
added-cues: bool) ; supports
? 2: text ; source-url
? 2: remote-playback-source ; source
? 3: &(
empty: 0
idle: 1
Expand Down

0 comments on commit 58e109c

Please sign in to comment.