-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fix caption integration #25
Conversation
With this change, I now see a CC button in Chrome with an english option listed. Picking the option renders the captions, however when there are multiple lines they appear upside down. |
I can't figure out why the cues are showing up in the wrong order.. This hacky change to video.js fixes it: diff --git a/src/js/tracks/text-track-display.js b/src/js/tracks/text-track-display.js
index 0097dd67..afd3fce3 100644
--- a/src/js/tracks/text-track-display.js
+++ b/src/js/tracks/text-track-display.js
@@ -242,6 +242,7 @@ class TextTrackDisplay extends Component {
for (let i = 0; i < track.activeCues.length; i++) {
cues.push(track.activeCues[i]);
}
+ cues.reverse();
window.WebVTT.processCues(window, cues, this.el_);
|
Couldn't reproduce so far, neither the missing button nor the reverse order. |
@mrbar42 this issue is specific to a/53 captions (also known CEA608/708 or EIA608) which are embedded in live tv video packets. See @ranuser99's example stream: https://1-fss-fso35.streamhoster.com/lv_ntv/broadcast1/playlist.m3u8 |
Here's the stream that hls.js uses in their tests: http://playertest.longtailvideo.com/adaptive/captions/playlist.m3u8 You can try it on http://video-dev.github.io/hls.js/demo/?src=http%3A%2F%2Fplayertest.longtailvideo.com%2Fadaptive%2Fcaptions%2Fplaylist.m3u8&enableStreaming=true&autoRecoverError=true&enableWorker=true&dumpfMP4=false&levelCapping=-1&defaultAudioCodec=undefined and see that captions are rendered. The same test with videojs on chrome should show the problem. |
My testing of this: VideoJS > 5.13.1 it looks like the problem is that video.js is unaware of the captions. seems like another fix is needed for newer videojs versions (not in the scope of this PR) |
Thanks @tmm1 ! |
This is a rebased version of #19 with additional fixes.
cc @ranuser99 @willkelleher