kixelated / moq-js

Typescript library for Media over QUIC
Apache License 2.0
143 stars 32 forks source link

Support display of available video tracks as drop-down and to enable user to swap among the video tracks of a namespace #113

Closed TilsonJoji closed 1 month ago

TilsonJoji commented 3 months ago

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 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-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.

TilsonJoji commented 3 months ago

UT

https://github.com/user-attachments/assets/dd54ebd0-ea79-4a15-8390-cbc1b61d0a4b

englishm commented 1 month ago

Feel free to reopen this as a PR against https://github.com/englishm/moq-js where I intend to continue tracking the MoQ WG drafts.