{"action":"created","issue":{"url":"https://api.github.com/repos/dailymotion/hls.js/issues/108","repository_url":"https://api.github.com/repos/dailymotion/hls.js","labels_url":"https://api.github.com/repos/dailymotion/hls.js/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/dailymotion/hls.js/issues/108/comments","events_url":"https://api.github.com/repos/dailymotion/hls.js/issues/108/events","html_url":"https://github.com/dailymotion/hls.js/issues/108","id":120064498,"number":108,"title":"Add CEA-708 parsing and rendering","user":{"login":"jlacivita","id":250303,"avatar_url":"https://avatars.githubusercontent.com/u/250303?v=3","gravatar_id":"","url":"https://api.github.com/users/jlacivita","html_url":"https://github.com/jlacivita","followers_url":"https://api.github.com/users/jlacivita/followers","following_url":"https://api.github.com/users/jlacivita/following{/other_user}","gists_url":"https://api.github.com/users/jlacivita/gists{/gist_id}","starred_url":"https://api.github.com/users/jlacivita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlacivita/subscriptions","organizations_url":"https://api.github.com/users/jlacivita/orgs","repos_url":"https://api.github.com/users/jlacivita/repos","events_url":"https://api.github.com/users/jlacivita/events{/privacy}","received_events_url":"https://api.github.com/users/jlacivita/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dailymotion/hls.js/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":34,"created_at":"2015-12-03T00:08:06Z","updated_at":"2016-03-25T21:47:40Z","closed_at":null,"body":"I've made a fork of hls.js so I can add the same CEA-708 parsing we integrated into flashls:\r\n\r\nhttps://github.com/jlacivita/hls.js\r\n\r\nThe great thing about hls.js is that we can leverage the TextTrack API to display the captions natively, so we don't need to surface binary onCaptionInfo events like we did in Flash, we can actually build an end-to-end CEA-708 feature that leverages the browsers ability to render VTTCues.\r\n\r\nI've got a rendering PoC here (nothing 708 specific here, just programmatically adding VTTCues to a video that's playing):\r\nhttp://demo.theplatform.com/jeremy/708/createTrackCue.html\r\n\r\nJust type some text and hit the button, you'll see captions show up.\r\n\r\nSo the needed parts are:\r\n\r\n1. parse the SEI messages out of each fragment in tsdemuxer.js (done)\r\n2. get them property sorted by PTS values\r\n3. bubble them up to some point in the hls.js source that can call video.addTextTrack() and track.addCue() as needed\r\n\r\nI've got 1 done, but they're just in a private array in tsdumuxer.  @mangui: any guidance on where to get the PTS value, and where the userData cues should be handed off so I can sort them (2) would be great"},"comment":{"url":"https://api.github.com/repos/dailymotion/hls.js/issues/comments/201529099","html_url":"https://github.com/dailymotion/hls.js/issues/108#issuecomment-201529099","issue_url":"https://api.github.com/repos/dailymotion/hls.js/issues/108","id":201529099,"user":{"login":"jlacivita","id":250303,"avatar_url":"https://avatars.githubusercontent.com/u/250303?v=3","gravatar_id":"","url":"https://api.github.com/users/jlacivita","html_url":"https://github.com/jlacivita","followers_url":"https://api.github.com/users/jlacivita/followers","following_url":"https://api.github.com/users/jlacivita/following{/other_user}","gists_url":"https://api.github.com/users/jlacivita/gists{/gist_id}","starred_url":"https://api.github.com/users/jlacivita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlacivita/subscriptions","organizations_url":"https://api.github.com/users/jlacivita/orgs","repos_url":"https://api.github.com/users/jlacivita/repos","events_url":"https://api.github.com/users/jlacivita/events{/privacy}","received_events_url":"https://api.github.com/users/jlacivita/received_events","type":"User","site_admin":false},"created_at":"2016-03-25T21:47:40Z","updated_at":"2016-03-25T21:47:40Z","body":"@jhumbug i just updated my branch to do a couple key things:\r\n\r\n1. Decouple the VTTCue creation (which tells the video tag to render them) from the timeline-controller, which doesn't handle any display stuff.  Now it's possible to set up your own renderer.\r\n2. Created a default cueHandler, to render them via the video tag, and include some browser specific adjustments\r\n3. added support for channel 2\r\n4. don't turn on CCs by default\r\n\r\nIt's mostly minor stuff, but if you could peek at it once more so i can get some external validation, i think this i ready to merge into the main branch"}}