cta-wave / common-media-client-data

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

Should State key only be allowed in State Reporting mode? #139

Closed wilaw closed 1 month ago

wilaw commented 2 months ago

Currently spec says "This key MUST only be used for state-interval reporting mode.". The thought was that the best state reporting is achieved with State Interval mode, which is designed for that purpose.

However someone using request mode and having their CDN collect the data, may also want to know about player state. The trouble is that the time at which the state chnage occured is not the time at which the request was made, as the two events are separated by the forward buffer length.

One solution might be to allow the state key in Request mode IF it is accompanied by a timestamp. The State should be the last state change that occurred since the prior request and the timestamp refers the time when that change occurred. In the example below, the seeking state is reported at a certain time.

CMCD-Request:mtp=25400
CMCD-Object:br=3200,d=4004,ot=v,tb=6000
CMCD-Status:sta=k, ts=1725555316032
CMCD-Session:sid="6e2fb550-c457-11e9-bb97-0800200c9a66"

One issue with this suggestion is that if multiple state changes occur since the last request, they are obscured by the last state which is reported. Perhaps this is acceptable as it it still better than no state reported.

wilaw commented 1 month ago

Nico - it was easy to add this key while we were implementing it. Not complete picture, but still adds value. Should report last state known by player. Alex - just say state at timestamp. If you want detailed state reporting, then use SI mode. Add note. Piers - could have counter to say latest state. Will - counters are bit of overhead, would rather use SI mode. Gwendal - do we need ts? This is rough estimate anyway. Paused is interesting. Seeking is also interesting.

Added

Note: if used with Request Mode or Response Mode, then this key represents a snapshot of the state at request time, which may obscure prior state changes since the last request. For most accurate state tracking in players, use State-Interval mode. The addition of a timestamp in Request Mode might be useful in correctly placing the state change on a timeline.