Add subtitle support (via drag-n-drop) (#361)

* issue template

* cleanup closePlayer() and stopServer()

* Add subtitle support (via drag-n-drop)

Drag and drop a subtitles file (.srt or .vtt) onto the player (or the
app icon on OS X) to add subtitles to the currently playing video.

For #281

* add multiple subtitles structure

* add open subtitle dialog from cc player controls
This commit is contained in:
Feross Aboukhadijeh
2016-04-10 16:42:18 -07:00
parent f9141dd39c
commit 1a0a2b3658
6 changed files with 124 additions and 30 deletions

View File

@@ -70,7 +70,11 @@ function getDefaultPlayState () {
isPaused: true,
isStalled: false,
lastTimeUpdate: 0, /* Unix time in ms */
mouseStationarySince: 0 /* Unix time in ms */
mouseStationarySince: 0, /* Unix time in ms */
subtitles: {
tracks: [], /* subtitles file (Buffer) */
enabled: false
}
}
}