cta-wave / common-media-client-data

A repository to collect discussion and feedback on the Common Media Client Data proposal.
24 stars 0 forks source link

Track player state via new "ps" key #120

Open wilaw opened 5 months ago

wilaw commented 5 months ago

We should create a key to be able to track different states of playback. Candidate states might be

Value name Descriptor
0 Startup Playback requested and building to target buffer. Content maybe rendering
1 Steady-state Normal playback. Buffers oscillate around their target values
2 Seeking Player moving the playhead to a new position
3 SwitchingUp player is raising its bitrate
4 SwitchingDown player is reducing the encoded bitrate
5 Paused playback is paused
6 Rebuffering playback is not rendering and is attmpeting to rebuild buffer
7 Error Player has encountered a fatal playback error

We might be able to repleace the SwitchingUp|Down with a single 'Switching state' and let the 'br' values describe the direction.

slhck commented 5 months ago

This is a great suggestion! It would really help if CMCD could be used to derive an accurate representation of what was going on for the user watching the media.

There are some aspects I believe need to be clarified. First, the described states actually happen at two layers:

The current suggestion is a bit of a mix between those two. The important buffer-level aspects (buffer length and buffer starvation) seem to be already handled by existing keys. With a focus on what the user perceived, I'd prefer transmitting information about the presentation layer.

There's a catch though: the time of sending those states may not correspond to the actual time at which they occurred on the client, because they are bound to the client making a request. This obviously does not apply to the transport mode where an independent JSON request is being sent. But it could lead to the receiving end getting a wrong representation of what actually happened at the client level.

This could be easily mitigated by requiring that, when a state transition is sent, the time of its change is also sent in a separate field (e.g., expressed as an absolute wall clock timestamp, or the ∆(current wall clock time, wall clock time of state change), to minimize the request footprint).

I would also suggest renaming/splitting up some states in line with the above considerations.

Edit:

ZmGorynych commented 1 month ago

I think this is a combination of playback and client status, and there are some states that are loosely related. I would indicate them separately. E.g., we have playback speed (1.0 -- normal, >1 ff, 0-1 slow motion, < 1, Innf -- skip, etc), and client states (switching, buffering, switching to different presentation such as interstitial, etc)

acbegen commented 3 weeks ago

3 SwitchingUp player is raising its bitrate 4 SwitchingDown player is reducing the encoded bitrate

Are not these actually events and to me, they are not states?

slhck commented 3 weeks ago

Yeah, that's true... actually you could call all these "events" and infer state from them. (They're very similar to the HTML5 media element events.)

ZmGorynych commented 3 weeks ago

Please don't call them events, this will confuse the DASH folks b/c of DASH events

On Thu, Jun 13, 2024, 16:39 Werner Robitza @.***> wrote:

Yeah, that's true... actually you could call all these "events" and infer state from them. (They're very similar to the HTML5 media element events.)

— Reply to this email directly, view it on GitHub https://github.com/cta-wave/common-media-client-data/issues/120#issuecomment-2165871926, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGEYZMSN3O3PQSJS4CLHETZHGVK7AVCNFSM6AAAAABCAUPWHCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRVHA3TCOJSGY . You are receiving this because you commented.Message ID: @.***>