Closed Bug 1242594 Opened 4 years ago Closed 3 years ago

textTracks lost when video removed from DOM


(Core :: Audio/Video: Playback, defect, P2)

46 Branch



Tracking Status
firefox49 --- fixed


(Reporter: psayre, Assigned: bechen)


(Blocks 1 open bug)



(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36

Steps to reproduce:

I loaded a HTML doc with a <track> inside a <video>. I removed the video element from the DOM, then added it back.

Test case:

Actual results:

The video.textTracks.length === 0 after the video is removed from the DOM.

Expected results:

The video.textTracks should contain the child <track> element.
After a little digging, this may also be related these:

Bug 1206304 - Created text tracks don't appear in the textTracks list

Bug 1097279 - HTML5 video tracks without src aren't counted. Lose count after wrap.
Blocks: webvtt
Component: Untriaged → Audio/Video
Product: Firefox → Core
Component: Audio/Video → Audio/Video: Playback
I'm experiencing the same thing. For video.js, I tried to enable native text track support but I'm unable to do so because video.js wraps the video element in a div so all tracks that are available when video.js initializes are lost due to this bug.

Here's my test case:
Comment on attachment 8745234 [details]
MozReview Request: Bug 1242594 - Don't remove the textTrack if it's parent is not null. r=rillian
Attachment #8745234 - Flags: review?(giles) → review+
Attachment #8745235 - Flags: review?(giles) → review+
Keywords: checkin-needed
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Duplicate of this bug: 1298718
You need to log in before you can comment on or make changes to this bug.