{"action":"created","issue":{"url":"https://api.github.com/repos/learningequality/ka-lite/issues/4166","labels_url":"https://api.github.com/repos/learningequality/ka-lite/issues/4166/labels{/name}","comments_url":"https://api.github.com/repos/learningequality/ka-lite/issues/4166/comments","events_url":"https://api.github.com/repos/learningequality/ka-lite/issues/4166/events","html_url":"https://github.com/learningequality/ka-lite/issues/4166","id":97489311,"number":4166,"title":"Migrate subtitles to VTT format","user":{"login":"radinamatic","id":1457929,"avatar_url":"https://avatars.githubusercontent.com/u/1457929?v=3","gravatar_id":"","url":"https://api.github.com/users/radinamatic","html_url":"https://github.com/radinamatic","followers_url":"https://api.github.com/users/radinamatic/followers","following_url":"https://api.github.com/users/radinamatic/following{/other_user}","gists_url":"https://api.github.com/users/radinamatic/gists{/gist_id}","starred_url":"https://api.github.com/users/radinamatic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radinamatic/subscriptions","organizations_url":"https://api.github.com/users/radinamatic/orgs","repos_url":"https://api.github.com/users/radinamatic/repos","events_url":"https://api.github.com/users/radinamatic/events{/privacy}","received_events_url":"https://api.github.com/users/radinamatic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/learningequality/ka-lite/labels/new%20feature","name":"new feature","color":"bfdadc"},{"url":"https://api.github.com/repos/learningequality/ka-lite/labels/translation","name":"translation","color":"5319e7"}],"state":"open","locked":false,"assignee":{"login":"aronasorman","id":191955,"avatar_url":"https://avatars.githubusercontent.com/u/191955?v=3","gravatar_id":"","url":"https://api.github.com/users/aronasorman","html_url":"https://github.com/aronasorman","followers_url":"https://api.github.com/users/aronasorman/followers","following_url":"https://api.github.com/users/aronasorman/following{/other_user}","gists_url":"https://api.github.com/users/aronasorman/gists{/gist_id}","starred_url":"https://api.github.com/users/aronasorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aronasorman/subscriptions","organizations_url":"https://api.github.com/users/aronasorman/orgs","repos_url":"https://api.github.com/users/aronasorman/repos","events_url":"https://api.github.com/users/aronasorman/events{/privacy}","received_events_url":"https://api.github.com/users/aronasorman/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/learningequality/ka-lite/milestones/50","html_url":"https://github.com/learningequality/ka-lite/milestones/0.16.0","labels_url":"https://api.github.com/repos/learningequality/ka-lite/milestones/50/labels","id":1227915,"number":50,"title":"0.16.0","description":"","creator":{"login":"aronasorman","id":191955,"avatar_url":"https://avatars.githubusercontent.com/u/191955?v=3","gravatar_id":"","url":"https://api.github.com/users/aronasorman","html_url":"https://github.com/aronasorman","followers_url":"https://api.github.com/users/aronasorman/followers","following_url":"https://api.github.com/users/aronasorman/following{/other_user}","gists_url":"https://api.github.com/users/aronasorman/gists{/gist_id}","starred_url":"https://api.github.com/users/aronasorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aronasorman/subscriptions","organizations_url":"https://api.github.com/users/aronasorman/orgs","repos_url":"https://api.github.com/users/aronasorman/repos","events_url":"https://api.github.com/users/aronasorman/events{/privacy}","received_events_url":"https://api.github.com/users/aronasorman/received_events","type":"User","site_admin":false},"open_issues":156,"closed_issues":108,"state":"open","created_at":"2015-07-27T17:17:39Z","updated_at":"2016-01-08T18:25:51Z","due_on":"2015-12-30T08:00:00Z","closed_at":null},"comments":12,"created_at":"2015-07-27T15:25:57Z","updated_at":"2016-01-09T20:08:33Z","closed_at":null,"body":"Migrate subtitles to VTT format\r\n\r\n*milestone to be decided*\r\nSee #4072 and #4151 for context.\r\n\r\nVideoJS version 4.11 that we currently have running on develop is the [last one that supports the](https://github.com/videojs/video.js/issues/1956#issuecomment-85617607) **SRT** format for subtitles. Given that the upgrade to `videojs` version 5 (once it is released) is recommended because of the a11y improvements, we'll have to implement the migration to **VTT** format prior to that.\r\n\r\n**Resources**:\r\nhttp://www.webvtt.org/\r\nhttps://github.com/captioning/captioning/wiki#convert-a-subrip-file-srt-into-a-webvtt-file-vtt\r\n  \r\n"},"comment":{"url":"https://api.github.com/repos/learningequality/ka-lite/issues/comments/170275385","html_url":"https://github.com/learningequality/ka-lite/issues/4166#issuecomment-170275385","issue_url":"https://api.github.com/repos/learningequality/ka-lite/issues/4166","id":170275385,"user":{"login":"benjaoming","id":374612,"avatar_url":"https://avatars.githubusercontent.com/u/374612?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaoming","html_url":"https://github.com/benjaoming","followers_url":"https://api.github.com/users/benjaoming/followers","following_url":"https://api.github.com/users/benjaoming/following{/other_user}","gists_url":"https://api.github.com/users/benjaoming/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaoming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaoming/subscriptions","organizations_url":"https://api.github.com/users/benjaoming/orgs","repos_url":"https://api.github.com/users/benjaoming/repos","events_url":"https://api.github.com/users/benjaoming/events{/privacy}","received_events_url":"https://api.github.com/users/benjaoming/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T20:08:33Z","updated_at":"2016-01-09T20:08:33Z","body":"Haven't checked if you guys have been working on this, but I implemented a VTT convertion in the ka-lite-zim app:\r\n\r\nhttps://github.com/benjaoming/ka-lite-zim/blob/436bdccd66f44aa9e521363b50d7560aa44f645d/kalite_zim/management/commands/export2zim.py#L268\r\n\r\nThe thing that made it work is [submarine](https://pypi.python.org/pypi/submarine/).\r\n\r\nFurthermore, I met issues with having video.js automatically play with subtitles enabled. The fix is this script:\r\n\r\n```javascript\r\n    $(document).ready(function() {\r\n      videojs(\"levideo\").ready(function(){\r\n        // Player (this) is initialized and ready.\r\n        $(\".vjs-subtitles-button .vjs-menu-item\").eq(1).trigger('click');\r\n      });\r\n    });\r\n```"}}