-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
TextTracks - Not cleaning up upon detachment #2198
Comments
unfortunately there's no |
What's the recommendation here? Recreate video element for every play back? |
Currently yes. |
@michaelcunningham19 as this is web platform limitation I suggest we close this. |
@OrenMe could hls.js clean up the cues? |
Actually, with Chrome on Windows using 0.12.4 I can't reproduce this issue anymore. Looking into this... |
So, these are the text tracks from a previous play. The timeline-controller will clean up the cues between media detachment. See the |
what if instead of adding a track programmatically with then we can remove the |
@jimmywarting That may work well in some or even most browsers, but it is not a good path forward for hls.js. We should maintain a policy of not modifying DOM tree structure in this project. Manipulating Give it a try https://jsfiddle.net/tgwvey8d/4/ sort of works in Chrome but if I chose a CC from the menu, the menu or toggle then disappears. Not in Safari, but for me track 1 defaults to on without any mode setting on tracks (Safari does some weird stuff automatically based on system-level preferences that can be toggled in the touch bar or system settings). You can disable hls.js's textTrack manipulation via If you'd like to continue the conversation or suggest/contribute a change, please create a new issue as this one is closed. The demo currently suffers from this issue in some respects and does not demonstrate the suggested workaround of replacing the video element when necessary, so I would happily accept a new issue that points that out specifically. |
Nah, i like the native tracks. it haven bother me yet that they still exist. I know the spec lacks the remove functionality. I just wanted to suggest a possible workaround if it even was possible/feasible. |
What version of Hls.js are you using?
0.12.4
What browser and OS are you using?
Chrome 73 on macOS
Test stream:
https://hls-js.netlify.com/demo/?src=https%3A%2F%2Fwowzaec2demo.streamlock.net%2Fvod-multitrack%2F_definst_%2Fsmil%3AElephantsDream%2Felephantsdream2.smil%2Fplaylist.m3u&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsImVuYWJsZVdvcmtlciI6dHJ1ZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xLCJ3aWRldmluZUxpY2Vuc2VVcmwiOiIifQ==
Checklist
Steps to reproduce
hls.destroy()
TextTrackList
is still populated with tracks and cues, see below screenshot.Expected behavior
I would expect that as part of the detaching phase, the
TextTrackList
would also be cleaned up / reset. At least having hls.js clean up what it created, to the best of its ability.Actual behavior
It's left as-is, leaving tracks (which is expected, no way to remove them) and their cues in place. This can cause odd behaviour with switching between content.
Console output
See screenshot:
The text was updated successfully, but these errors were encountered: