mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update video osd
This commit is contained in:
parent
31b6fde452
commit
7b22758cec
4 changed files with 56 additions and 190 deletions
|
@ -655,173 +655,6 @@ var Dashboard = {
|
|||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
function updateDeviceProfileForAndroid(profile) {
|
||||
|
||||
// Just here as an easy escape out, if ever needed
|
||||
var enableVlcVideo = true;
|
||||
var enableVlcAudio = window.VlcAudio;
|
||||
|
||||
if (enableVlcVideo) {
|
||||
|
||||
profile.DirectPlayProfiles.push({
|
||||
Container: "m4v,3gp,ts,mpegts,mov,xvid,vob,mkv,wmv,asf,ogm,ogv,m2v,avi,mpg,mpeg,mp4,webm,wtv",
|
||||
Type: 'Video',
|
||||
AudioCodec: 'aac,aac_latm,mp2,mp3,ac3,wma,dca,dts,pcm,PCM_S16LE,PCM_S24LE,opus,flac'
|
||||
});
|
||||
|
||||
profile.CodecProfiles = profile.CodecProfiles.filter(function (i) {
|
||||
return i.Type == 'Audio';
|
||||
});
|
||||
|
||||
profile.SubtitleProfiles = [];
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'srt',
|
||||
Method: 'External'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'ssa',
|
||||
Method: 'External'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'ass',
|
||||
Method: 'External'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'srt',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'subrip',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'ass',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'ssa',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'dvb_teletext',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'dvb_subtitle',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'dvbsub',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'pgs',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'pgssub',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'dvdsub',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'vtt',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'sub',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'idx',
|
||||
Method: 'Embed'
|
||||
});
|
||||
profile.SubtitleProfiles.push({
|
||||
Format: 'smi',
|
||||
Method: 'Embed'
|
||||
});
|
||||
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'Video',
|
||||
Container: 'avi',
|
||||
Conditions: [
|
||||
{
|
||||
Condition: 'NotEqual',
|
||||
Property: 'CodecTag',
|
||||
Value: 'xvid'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'Video',
|
||||
Codec: 'h264',
|
||||
Conditions: [
|
||||
{
|
||||
Condition: 'EqualsAny',
|
||||
Property: 'VideoProfile',
|
||||
Value: 'high|main|baseline|constrained baseline'
|
||||
},
|
||||
{
|
||||
Condition: 'LessThanEqual',
|
||||
Property: 'VideoLevel',
|
||||
Value: '41'
|
||||
}]
|
||||
});
|
||||
|
||||
//profile.TranscodingProfiles.filter(function (p) {
|
||||
|
||||
// return p.Type == 'Video' && p.Container == 'mkv';
|
||||
|
||||
//}).forEach(function (p) {
|
||||
|
||||
// p.Container = 'ts';
|
||||
//});
|
||||
|
||||
profile.TranscodingProfiles.filter(function (p) {
|
||||
|
||||
return p.Type == 'Video' && p.CopyTimestamps == true;
|
||||
|
||||
}).forEach(function (p) {
|
||||
|
||||
// Vlc doesn't seem to handle this well
|
||||
p.CopyTimestamps = false;
|
||||
});
|
||||
|
||||
profile.TranscodingProfiles.filter(function (p) {
|
||||
|
||||
return p.Type == 'Video' && p.VideoCodec == 'h264';
|
||||
|
||||
}).forEach(function (p) {
|
||||
|
||||
p.AudioCodec += ',ac3';
|
||||
});
|
||||
}
|
||||
|
||||
if (enableVlcAudio) {
|
||||
|
||||
profile.DirectPlayProfiles.push({
|
||||
Container: "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus,flac,m4a",
|
||||
Type: 'Audio'
|
||||
});
|
||||
|
||||
profile.CodecProfiles = profile.CodecProfiles.filter(function (i) {
|
||||
return i.Type != 'Audio';
|
||||
});
|
||||
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'Audio',
|
||||
Conditions: [{
|
||||
Condition: 'LessThanEqual',
|
||||
Property: 'AudioChannels',
|
||||
Value: '2'
|
||||
}]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
require(['browserdeviceprofile', 'qualityoptions', 'appSettings'], function (profileBuilder, qualityoptions, appSettings) {
|
||||
|
||||
var profile = profileBuilder(Object.assign(profileOptions || {}, {
|
||||
|
@ -847,10 +680,6 @@ var Dashboard = {
|
|||
})[0].maxHeight;
|
||||
}
|
||||
|
||||
if (AppInfo.isNativeApp && browserInfo.android) {
|
||||
updateDeviceProfileForAndroid(profile);
|
||||
}
|
||||
|
||||
profile.MaxStreamingBitrate = bitrateSetting;
|
||||
profile.MaxStaticMusicBitrate = appSettings.maxStaticMusicBitrate();
|
||||
|
||||
|
@ -1628,11 +1457,6 @@ var AppInfo = {};
|
|||
define("nativedirectorychooser", ["cordova/nativedirectorychooser"]);
|
||||
}
|
||||
|
||||
if (Dashboard.isRunningInCordova() && browserInfo.android) {
|
||||
|
||||
window.VlcAudio = true;
|
||||
}
|
||||
|
||||
if (Dashboard.isRunningInCordova() && browserInfo.android) {
|
||||
define("localsync", ["cordova/localsync"], returnFirstDependency);
|
||||
}
|
||||
|
@ -2551,7 +2375,21 @@ var AppInfo = {};
|
|||
//'plugins/playbackvalidation/plugin'
|
||||
];
|
||||
|
||||
if (Dashboard.isRunningInCordova() && browser.safari) {
|
||||
if (Dashboard.isRunningInCordova() && browser.android) {
|
||||
|
||||
// use the html audio player if flac is supported
|
||||
if (document.createElement('audio').canPlayType('audio/flac').replace(/no/, '') &&
|
||||
document.createElement('audio').canPlayType('audio/ogg; codecs="opus"').replace(/no/, '')) {
|
||||
|
||||
list.push('bower_components/emby-webcomponents/htmlaudioplayer/plugin');
|
||||
|
||||
} else {
|
||||
|
||||
// use vlc player
|
||||
list.push('cordova/vlcplayer');
|
||||
}
|
||||
|
||||
} else if (Dashboard.isRunningInCordova() && browser.safari) {
|
||||
list.push('cordova/audioplayer');
|
||||
} else {
|
||||
list.push('bower_components/emby-webcomponents/htmlaudioplayer/plugin');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue