1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

render ssa/ass subs in browser

This commit is contained in:
Luke Pulverenti 2016-04-04 21:23:42 -04:00
parent 3c2d0cd3a1
commit cc2c794ad0
26 changed files with 10493 additions and 138 deletions

View file

@ -198,10 +198,33 @@ define(['appSettings', 'userSettings', 'appStorage'], function (appSettings, use
require(['browserdeviceprofile', 'qualityoptions'], function (profileBuilder, qualityoptions) {
var supportsCustomSeeking = false;
if (!browserInfo.mobile) {
supportsCustomSeeking = true;
} else if (AppInfo.isNativeApp && browserInfo.safari) {
if (navigator.userAgent.toLowerCase().indexOf('ipad') == -1) {
// Need to disable it in order to support picture in picture
supportsCustomSeeking = true;
}
} else if (AppInfo.isNativeApp) {
supportsCustomSeeking = true;
}
var profile = profileBuilder({
supportsAutoPlay: !browserInfo.mobile || AppInfo.isNativeApp
supportsCustomSeeking: supportsCustomSeeking
});
if (!(AppInfo.isNativeApp && browserInfo.android)) {
profile.SubtitleProfiles.push({
Format: 'ass',
Method: 'External'
});
profile.SubtitleProfiles.push({
Format: 'ssa',
Method: 'External'
});
}
var bitrateSetting = appSettings.maxStreamingBitrate();
if (!maxHeight) {
@ -434,7 +457,8 @@ define(['appSettings', 'userSettings', 'appStorage'], function (appSettings, use
url: textStreamUrl,
language: (textStream.Language || 'und'),
isDefault: textStream.Index == mediaSource.DefaultSubtitleStreamIndex,
index: textStream.Index
index: textStream.Index,
format: textStream.Codec
});
}