Closed Bug 1242594 Opened 9 years ago Closed 9 years ago

textTracks lost when video removed from DOM

Categories

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

46 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: psayre, Assigned: bechen)

References

(Blocks 1 open bug)

Details

Attachments

(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: http://jsfiddle.net/4efxr61w/5/ 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 https://bugzilla.mozilla.org/show_bug.cgi?id=1206304 Bug 1097279 - HTML5 video tracks without src aren't counted. Lose count after wrap. https://bugzilla.mozilla.org/show_bug.cgi?id=1097279
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: http://plnkr.co/edit/xmG766?p=preview
Comment on attachment 8745234 [details] MozReview Request: Bug 1242594 - Don't remove the textTrack if it's parent is not null. r=rillian https://reviewboard.mozilla.org/r/48943/#review46347
Attachment #8745234 - Flags: review?(giles) → review+
Attachment #8745235 - Flags: review?(giles) → review+
Keywords: checkin-needed
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: