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

How do you reset vtt.js tracks after changing video with player.attachSource() ? #4220

Open
dsilhavy opened this issue Jul 9, 2023 Discussed in #4219 · 4 comments
Open
Milestone

Comments

@dsilhavy
Copy link
Collaborator

dsilhavy commented Jul 9, 2023

Discussed in #4219

Originally posted by Eeel-12 July 8, 2023
Hi,

With dash.js 4.7.1 i use player.attachSource(manifest.mpd) to change video on a same page without initializing the whole player, this works fine with customRenderingEnabled: false

With vtt.js enable when switching to another video with player.attachSource(manifest.mpd) the player render the new vtt track and the one from the previous video.

I tried to destroy the player with no luck, after initialize() vtt.js continue to render all the vtt tracks.

How can i "reset" vtt.js before loading a new video with player.attachSource() without re loading the whole player ?

@dsilhavy
Copy link
Collaborator Author

Fixed in #4224 , can you confirm that the problem is solved in the nightly version: https://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html

@Eeel-12
Copy link

Eeel-12 commented Jul 17, 2023

Hi,
Thank you for the fix, i confirm it works fine, while i was testing i realise that on some videos subtitles are not displayed, this did not happen with customRenderingEnabled: false but maybe it's something with my js code?
I have removed all my unecessary Js and created a pen with the nightly build and The Big Buck Bunny here click on the button video 1 then video 2, subtitles are not visible in the second video, with customRenderingEnabled: false subtitles are always visible no matter how fast you switch from video.

@dsilhavy
Copy link
Collaborator Author

@Eeel-12 Can you also reproduce this error in our reference UI? http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html

@Eeel-12
Copy link

Eeel-12 commented Sep 13, 2023

@dsilhavy thank you.

A Pen is available here using nightly in settings. It is better but the issue still exist.
For video 1 & 2, the first caption is at 4s and the second at 17s, on 'video 1' click, caption is working, on 'video 2' click the first caption at 4s is never shown but the one at 17s and after is working fine.
On 'video 3' button it's the dash.js Elephant dream, on click,caption don't show at all (timecode is at 20, 18, 20, 22 ...)
If 'video 3' is clicked first, caption works fine.

Hope that help,

@dsilhavy dsilhavy modified the milestones: 4.7.2, 5.0.0 Sep 28, 2023
@dsilhavy dsilhavy removed their assignment Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants