Skip to content

Commit

Permalink
Add external srt support
Browse files Browse the repository at this point in the history
  • Loading branch information
YouKnowBlom committed Aug 9, 2020
1 parent 4743243 commit 1f48039
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,12 @@ export function createStreamInfo(item, mediaSource, startPosition) {
var subtitleTracks = []
subtitleStreams.forEach(function (subtitleStream) {
let subStreamCodec = subtitleStream.Codec.toLowerCase();
if (subStreamCodec !== 'vtt' && subStreamCodec !== 'webvtt') {
/* the CAF v3 player only supports vtt currently,
support for more could be added with a custom implementation*/
if (subStreamCodec !== 'vtt' &&
subStreamCodec !== 'webvtt' &&
(subStreamCodec === 'srt' && subtitleStream.DeliveryMethod !== "External")) {
/* The CAF v3 player only supports vtt currently,
SRT subs can be "transcoded" to vtt by jellyfin.
Support for more could be added with a custom implementation */
return;
}
var textStreamUrl = subtitleStream.IsExternalUrl ? subtitleStream.DeliveryUrl : (getUrl(item.serverAddress, subtitleStream.DeliveryUrl));
Expand Down

0 comments on commit 1f48039

Please sign in to comment.