Skip to content

TextTracks - Not cleaning up upon detachment #2198

@michaelcunningham19

Description

@michaelcunningham19

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

  1. Open the test stream permalink above. Once playback begins, enable one of the subtitles tracks
  2. In the browser console, run hls.destroy()
  3. Observe the video element's TextTrackList is still populated with tracks and cues, see below screenshot.
  4. Switch to test stream to 'CNN special report, with CC``
  5. Observe text tracks from the previous playback session still exist and are selectable.

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:
Screenshot 2019-03-27 13 40 40

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions