Hello Luke @kixelated , with this PR have attempted to implement a provision to manually swap between video tracks on the Watch UI, without having to refresh/reload the page, as a first step towards ABR.
Please find below list of changes included in this PR:
Display available video tracks as a drop-down , track names will be displayed in the drop-down.
User can swap between video tracks by clicking on the track name in the dropdown , the video track will be changed without page refresh.
User can subscribe to a particular track by appending the track number in the URL or by selecting a track from the dropdown list , if no track is specified, by default it would subscribe to track0.
Tracks selected would be retained on page-reload.
When the user swaps a video track, unsubscribe is sent to moq-relay for the current track and subscribe is sent to the selected track.
With this PR in moq-rs , have added changes to dev/pub to enable us to create multiple video tracks ( 3 tracks ) and an audio track ingested as part of a single namespace via moq-pub , these tracks will be displayed as drop-down in moq-jsWatch UI and user will be able to select a video track.
W.r.t to Unsubscribe sent from moq-js as of now we receive _SUBSCRIBEERROR , code 1 , reason = cancelled from moq-relay , am not sure if it is the correct code in response, I would have to explore it further.
Another point I would like to bring your kind attention to is during UT, I observed this DOMException , i.e. Failed to execute 'decode' on 'VideoDecoder': A key frame is required after configure() or flush(), due to which I had to add a check to wait for keyframe at startup immediately after configure, it works and I no longer encounter the DOMException , but because of the initial wait for key frame at times there is a few sec of delay for stream play and we have to make FFmpeg send short interval keyframe , kindly advise whether we could handle it in a better way.
Kindly review and let me know your thoughts and amendments to be done.
Hello Luke @kixelated , with this PR have attempted to implement a provision to manually swap between video tracks on the Watch UI, without having to refresh/reload the page, as a first step towards ABR.
Please find below list of changes included in this PR:
With this PR in
moq-rs
, have added changes todev/pub
to enable us to create multiple video tracks ( 3 tracks ) and an audio track ingested as part of a single namespace viamoq-pub
, these tracks will be displayed as drop-down inmoq-js
Watch UI
and user will be able to select a video track.W.r.t to Unsubscribe sent from
moq-js
as of now we receive _SUBSCRIBEERROR , code 1 , reason = cancelled from moq-relay , am not sure if it is the correct code in response, I would have to explore it further.Another point I would like to bring your kind attention to is during UT, I observed this DOMException , i.e. Failed to execute 'decode' on 'VideoDecoder': A key frame is required after configure() or flush(), due to which I had to add a check to wait for keyframe at startup immediately after configure, it works and I no longer encounter the DOMException , but because of the initial wait for key frame at times there is a few sec of delay for stream play and we have to make FFmpeg send short interval keyframe , kindly advise whether we could handle it in a better way.
Kindly review and let me know your thoughts and amendments to be done.