added IsTextSubtitleStream

This commit is contained in:
Luke Pulverenti 2014-06-11 16:57:18 -04:00
parent 741ba6a543
commit f977419f95

View File

@ -742,7 +742,7 @@
mediaSourceId: mediaSource.Id
};
if (selectedSubtitleStream && selectedSubtitleStream.IsGraphicalSubtitleStream) {
if (selectedSubtitleStream && !selectedSubtitleStream.IsTextSubtitleStream) {
baseParams.SubtitleStreamIndex = mediaSource.DefaultSubtitleStreamIndex;
}
@ -843,14 +843,13 @@
html += '<source type="video/mp4" src="' + mp4VideoUrl + '" />';
var textStreams = subtitleStreams.filter(function (s) {
return !s.IsGraphicalSubtitleStream;
return s.IsTextSubtitleStream;
});
for (var i = 0, length = textStreams.length; i < length; i++) {
var textStream = textStreams[i];
var textStreamUrl = ApiClient.getUrl('Videos/' + item.Id + '/Subtitles/' + textStream.Index + '/Stream.vtt', {
mediaSourceId: mediaSource.Id
var textStreamUrl = ApiClient.getUrl('Videos/' + item.Id + '/' + mediaSource.Id + '/Subtitles/' + textStream.Index + '/Stream.vtt', {
});
var defaultAttribute = i.Index == mediaSource.DefaultSubtitleStreamIndex ? ' default' : '';