Skip to content

Commit

Permalink
Merge pull request jellyfin#55 from YouKnowBlom/srt-fix
Browse files Browse the repository at this point in the history
Add external srt support
  • Loading branch information
YouKnowBlom authored Aug 19, 2020
2 parents 4743243 + 1f48039 commit 1f0f0bb
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 1f0f0bb

Please sign in to comment.