| Summary: | Toggling video subtitle display does not restore previous track mode | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Adams <chris> |
| Component: | Media | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Minor | CC: | bfulgham, eric.carlson, jer.noble, jonlee |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://acdha.github.io/html5-media-synchronized-subtitles/demo.html | ||
|
Description
Chris Adams
2014-07-22 09:23:17 PDT
The easiest way to fix this would be changing the subtitle logic to restore the previous text track mode (i.e. "hidden") rather than setting it to "disabled". Updated title to reflect that this is really a combination of the default UI and that track mode changes do not trigger an event. You can listen for a 'change' event and set the track mode yourself. (In reply to comment #3) > You can listen for a 'change' event and set the track mode yourself. I tried that this morning but never received a change event. I'll make a smaller test case. (In reply to comment #3) > You can listen for a 'change' event and set the track mode yourself. Here's a testcase I tossed together: http://chris.improbable.org/experiments/browser/video/track-change-events.html This registers a change listener on video, source and track elements, the video element's textTracks property, and the track element's track property, but doesn't receive an event from changes originated in either the UI or by updating the track's mode directly. (Interestingly, it also shows a behaviour which only happens in WebKit but not IE11 where change the track element's src attribute causes the active cue to display multiple times even though there is still only one track element on the page) (In reply to comment #5) > This registers a change listener on video, source and track elements, the video element's textTracks property, and the track element's track property, but doesn't receive an event from changes originated in either the UI or by updating the track's mode directly. A quick test in Firefox 31 shows change messages being delivered to the TextTrackList as described by the spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content.html#handler-texttracklist-onchange My apologies, after updating my local WebKit nightly the problem was indeed fixed at some point after Safari 7.0.5. (In reply to comment #7) > My apologies, after updating my local WebKit nightly the problem was indeed fixed at some point after Safari 7.0.5. Thank you for taking the time to diagnose this! |