mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
Conflicts: MediaBrowser.WebDashboard/dashboard-ui/bower_components/emby-webcomponents/browserdeviceprofile.js
This commit is contained in:
parent
e4fcafe7aa
commit
8436c7ff3c
3 changed files with 86 additions and 122 deletions
|
@ -15,12 +15,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.0.31",
|
"version": "1.0.32",
|
||||||
"_release": "1.0.31",
|
"_release": "1.0.32",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.0.31",
|
"tag": "1.0.32",
|
||||||
"commit": "ca58e91f3f9285e81214f6e8cc6f1f04e9c505ed"
|
"commit": "4f59bdceba30ab8a9e1bf4c7d6bacd659d27b9bb"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "~1.0.0",
|
"_target": "~1.0.0",
|
||||||
|
|
|
@ -5,53 +5,6 @@ define(['browser'], function (browser) {
|
||||||
return !!(v.canPlayType && v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/, ''));
|
return !!(v.canPlayType && v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"').replace(/no/, ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
var supportedFormats;
|
|
||||||
function getSupportedFormats() {
|
|
||||||
|
|
||||||
if (supportedFormats) {
|
|
||||||
return supportedFormats;
|
|
||||||
}
|
|
||||||
|
|
||||||
var list = [];
|
|
||||||
var elem = document.createElement('video');
|
|
||||||
|
|
||||||
if (elem.canPlayType('video/webm').replace(/no/, '')) {
|
|
||||||
list.push('webm');
|
|
||||||
}
|
|
||||||
if (elem.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/, '')) {
|
|
||||||
list.push('ac3');
|
|
||||||
}
|
|
||||||
if (browser.chrome) {
|
|
||||||
list.push('mkv');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (canPlayH264()) {
|
|
||||||
list.push('h264');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (document.createElement('audio').canPlayType('audio/aac').replace(/no/, '') || browser.firefox) {
|
|
||||||
list.push('aac');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (document.createElement('audio').canPlayType('audio/mp3').replace(/no/, '')) {
|
|
||||||
list.push('mp3');
|
|
||||||
}
|
|
||||||
if (document.createElement('audio').canPlayType('audio/ogg; codecs="opus"').replace(/no/, '')) {
|
|
||||||
list.push('opus');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (document.createElement('audio').canPlayType('audio/webm').replace(/no/, '')) {
|
|
||||||
list.push('webma');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (document.createElement('audio').canPlayType('audio/flac').replace(/no/, '')) {
|
|
||||||
list.push('flac');
|
|
||||||
}
|
|
||||||
|
|
||||||
supportedFormats = list;
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
var _supportsTextTracks;
|
var _supportsTextTracks;
|
||||||
function supportsTextTracks() {
|
function supportsTextTracks() {
|
||||||
|
|
||||||
|
@ -92,17 +45,34 @@ define(['browser'], function (browser) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function canPlayAudioFormat(format) {
|
||||||
|
|
||||||
|
var typeString;
|
||||||
|
|
||||||
|
if (format == 'opus') {
|
||||||
|
typeString = 'audio/ogg; codecs="opus"';
|
||||||
|
} else if (format == 'webma') {
|
||||||
|
typeString = 'audio/webm';
|
||||||
|
} else {
|
||||||
|
typeString = 'audio/' + format;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (document.createElement('audio').canPlayType(typeString).replace(/no/, '')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return function () {
|
return function () {
|
||||||
|
|
||||||
var bitrateSetting = 100000000;
|
var bitrateSetting = 100000000;
|
||||||
|
|
||||||
var supportedFormats = getSupportedFormats();
|
var videoTestElement = document.createElement('video');
|
||||||
|
|
||||||
var canPlayWebm = supportedFormats.indexOf('webm') != -1;
|
var canPlayWebm = videoTestElement.canPlayType('video/webm').replace(/no/, '');
|
||||||
var canPlayAc3 = supportedFormats.indexOf('ac3') != -1;
|
// No real way to detect this, but it's too good to pass up
|
||||||
var canPlayMp3 = supportedFormats.indexOf('mp3') != -1;
|
var canPlayMkv = browser.chrome;
|
||||||
var canPlayAac = supportedFormats.indexOf('aac') != -1;
|
|
||||||
var canPlayMkv = supportedFormats.indexOf('mkv') != -1;
|
|
||||||
|
|
||||||
var profile = {};
|
var profile = {};
|
||||||
|
|
||||||
|
@ -114,26 +84,29 @@ define(['browser'], function (browser) {
|
||||||
|
|
||||||
var videoAudioCodecs = [];
|
var videoAudioCodecs = [];
|
||||||
|
|
||||||
|
var supportsMp3VideoAudio = videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.69"').replace(/no/, '') ||
|
||||||
|
videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.6B"').replace(/no/, '');
|
||||||
|
|
||||||
// Only put mp3 first if mkv support is there
|
// Only put mp3 first if mkv support is there
|
||||||
// Otherwise with HLS and mp3 audio we're seeing some browsers
|
// Otherwise with HLS and mp3 audio we're seeing some browsers
|
||||||
|
if (videoTestElement.canPlayType('audio/mp4; codecs="ac-3"').replace(/no/, '')) {
|
||||||
|
videoAudioCodecs.push('ac3');
|
||||||
|
}
|
||||||
if (canPlayMkv) {
|
if (canPlayMkv) {
|
||||||
if (canPlayMp3) {
|
if (supportsMp3VideoAudio) {
|
||||||
videoAudioCodecs.push('mp3');
|
videoAudioCodecs.push('mp3');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (canPlayAac) {
|
if (videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.2"').replace(/no/, '')) {
|
||||||
videoAudioCodecs.push('aac');
|
videoAudioCodecs.push('aac');
|
||||||
}
|
}
|
||||||
if (!canPlayMkv) {
|
if (!canPlayMkv) {
|
||||||
if (canPlayMp3) {
|
if (supportsMp3VideoAudio) {
|
||||||
videoAudioCodecs.push('mp3');
|
videoAudioCodecs.push('mp3');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (canPlayAc3) {
|
|
||||||
videoAudioCodecs.push('ac3');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (supportedFormats.indexOf('h264') != -1) {
|
if (canPlayH264()) {
|
||||||
profile.DirectPlayProfiles.push({
|
profile.DirectPlayProfiles.push({
|
||||||
Container: 'mp4,m4v',
|
Container: 'mp4,m4v',
|
||||||
Type: 'Video',
|
Type: 'Video',
|
||||||
|
@ -151,14 +124,12 @@ define(['browser'], function (browser) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
['opus', 'mp3', 'aac', 'flac', 'webma'].forEach(function (audioFormat) {
|
['opus', 'mp3', 'aac', 'flac', 'webma'].filter(canPlayAudioFormat).forEach(function (audioFormat) {
|
||||||
|
|
||||||
if (supportedFormats.indexOf(audioFormat) != -1) {
|
|
||||||
profile.DirectPlayProfiles.push({
|
profile.DirectPlayProfiles.push({
|
||||||
Container: audioFormat == 'webma' ? 'webma,webm' : audioFormat,
|
Container: audioFormat == 'webma' ? 'webma,webm' : audioFormat,
|
||||||
Type: 'Audio'
|
Type: 'Audio'
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (canPlayWebm) {
|
if (canPlayWebm) {
|
||||||
|
@ -170,9 +141,8 @@ define(['browser'], function (browser) {
|
||||||
|
|
||||||
profile.TranscodingProfiles = [];
|
profile.TranscodingProfiles = [];
|
||||||
|
|
||||||
['opus', 'mp3', 'aac'].forEach(function (audioFormat) {
|
['opus', 'mp3', 'aac'].filter(canPlayAudioFormat).forEach(function (audioFormat) {
|
||||||
|
|
||||||
if (supportedFormats.indexOf(audioFormat) != -1) {
|
|
||||||
profile.TranscodingProfiles.push({
|
profile.TranscodingProfiles.push({
|
||||||
Container: audioFormat,
|
Container: audioFormat,
|
||||||
Type: 'Audio',
|
Type: 'Audio',
|
||||||
|
@ -187,7 +157,6 @@ define(['browser'], function (browser) {
|
||||||
Context: 'Static',
|
Context: 'Static',
|
||||||
Protocol: 'http'
|
Protocol: 'http'
|
||||||
});
|
});
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Can't use mkv on mobile because we have to use the native player controls and they won't be able to seek it
|
// Can't use mkv on mobile because we have to use the native player controls and they won't be able to seek it
|
||||||
|
@ -256,10 +225,11 @@ define(['browser'], function (browser) {
|
||||||
|
|
||||||
var videoAudioChannels = '6';
|
var videoAudioChannels = '6';
|
||||||
|
|
||||||
|
// Handle he-aac not supported
|
||||||
|
if (!videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.5"').replace(/no/, '')) {
|
||||||
profile.CodecProfiles.push({
|
profile.CodecProfiles.push({
|
||||||
Type: 'VideoAudio',
|
Type: 'VideoAudio',
|
||||||
Codec: 'aac',
|
Codec: 'aac',
|
||||||
Container: 'mkv,mov',
|
|
||||||
Conditions: [
|
Conditions: [
|
||||||
{
|
{
|
||||||
Condition: 'NotEquals',
|
Condition: 'NotEquals',
|
||||||
|
@ -277,15 +247,9 @@ define(['browser'], function (browser) {
|
||||||
Value: 'false',
|
Value: 'false',
|
||||||
IsRequired: 'false'
|
IsRequired: 'false'
|
||||||
}
|
}
|
||||||
// Disabling this is going to require us to learn why it was disabled in the first place
|
|
||||||
//,
|
|
||||||
//{
|
|
||||||
// Condition: 'NotEquals',
|
|
||||||
// Property: 'AudioProfile',
|
|
||||||
// Value: 'LC'
|
|
||||||
//}
|
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
profile.CodecProfiles.push({
|
profile.CodecProfiles.push({
|
||||||
Type: 'VideoAudio',
|
Type: 'VideoAudio',
|
||||||
|
|
|
@ -788,7 +788,7 @@
|
||||||
showOverlayTimeout = setTimeout(function () {
|
showOverlayTimeout = setTimeout(function () {
|
||||||
onShowTimerExpired(elem);
|
onShowTimerExpired(elem);
|
||||||
|
|
||||||
}, 1000);
|
}, 1200);
|
||||||
}
|
}
|
||||||
|
|
||||||
function preventTouchHover() {
|
function preventTouchHover() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue