openscreenprotocol icon indicating copy to clipboard operation
openscreenprotocol copied to clipboard

Update media time usage for remote playback protocol.

Open markafoltz opened this issue 1 year ago • 0 comments

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

markafoltz avatar Feb 28 '24 23:02 markafoltz