Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update media time usage for remote playback protocol. #328

Merged
merged 3 commits into from
May 31, 2024

Conversation

mfoltzgoogle
Copy link
Contributor

@mfoltzgoogle mfoltzgoogle commented Feb 28, 2024

Addresses and closes Issue #327: Representation of time in remote-playback-state

The current spec uses the per-frame media synchronization timestamps to control and update the media playback state and handle other time specific fields. This has a few issues:

  1. The media start date is defined as milliseconds since the epoch (1/1/1970 00:00), not anything related to a specific media playback.
  2. Other media times are all defined as floating point seconds on the media timeline.
  3. Only media playbacks that use streaming (instead of just sending a URL) will use the media synchronization time at all.

Therefore, to align with HTML, we just convert time fields to correspond to the types that are exposed in script on media elements, so that agents don't have to translate to/from media synchronization time. (For cases where conversion is necessary, I added an appendix with a formula to do that.)

The protocol also used "unknown" to represent an unknown value, which does not have meaning in CBOR or CDDL. This PR also updates the protocol to use CBOR null instead which is a primitive value in CBOR.


Preview | Diff

@mfoltzgoogle mfoltzgoogle linked an issue Feb 28, 2024 that may be closed by this pull request
@mfoltzgoogle mfoltzgoogle self-assigned this Feb 28, 2024
index.bs Show resolved Hide resolved
messages_appendix.cddl Outdated Show resolved Hide resolved
@mfoltzgoogle mfoltzgoogle merged commit 4a988e3 into main May 31, 2024
2 checks passed
@mfoltzgoogle mfoltzgoogle deleted the issue-327-time branch May 31, 2024 23:13
github-actions bot added a commit that referenced this pull request May 31, 2024
SHA: 4a988e3
Reason: push, by mfoltzgoogle

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Representation of time in remote-playback-state
2 participants