Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support display of available video tracks as drop-down and to swap among them #3

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

TilsonJoji
Copy link
Contributor

Hello Mike @englishm

Re-opening this PR that had raised in Luke's repo , along with the code and description here.

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-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 SUBSCRIBE_ERROR , 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
Copy link
Contributor Author

UT

trackswap-UT-draft05.mp4

@TilsonJoji TilsonJoji marked this pull request as ready for review November 11, 2024 13:55
@TilsonJoji
Copy link
Contributor Author

Hello @englishm , I hope you're doing well , just following up , please let me know any feedback you would like me to address. Thank you.

@englishm
Copy link
Owner

LGTM!

@englishm englishm merged commit f944367 into englishm:main Nov 20, 2024
1 check passed
zafergurel pushed a commit to zafergurel/moq-js that referenced this pull request Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants