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": {},
|
||||
"ignore": [],
|
||||
"version": "1.0.31",
|
||||
"_release": "1.0.31",
|
||||
"version": "1.0.32",
|
||||
"_release": "1.0.32",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.0.31",
|
||||
"commit": "ca58e91f3f9285e81214f6e8cc6f1f04e9c505ed"
|
||||
"tag": "1.0.32",
|
||||
"commit": "4f59bdceba30ab8a9e1bf4c7d6bacd659d27b9bb"
|
||||
},
|
||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_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/, ''));
|
||||
}
|
||||
|
||||
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;
|
||||
function supportsTextTracks() {
|
||||
|
||||
|
@ -85,9 +38,28 @@ define(['browser'], function (browser) {
|
|||
|
||||
function canPlayHlsWithMSE() {
|
||||
if (window.MediaSource != null) {
|
||||
// text tracks don’t work with this in firefox
|
||||
return !browser.firefox;
|
||||
}
|
||||
// text tracks don’t work with this in firefox
|
||||
return !browser.firefox;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -96,13 +68,11 @@ define(['browser'], function (browser) {
|
|||
|
||||
var bitrateSetting = 100000000;
|
||||
|
||||
var supportedFormats = getSupportedFormats();
|
||||
var videoTestElement = document.createElement('video');
|
||||
|
||||
var canPlayWebm = supportedFormats.indexOf('webm') != -1;
|
||||
var canPlayAc3 = supportedFormats.indexOf('ac3') != -1;
|
||||
var canPlayMp3 = supportedFormats.indexOf('mp3') != -1;
|
||||
var canPlayAac = supportedFormats.indexOf('aac') != -1;
|
||||
var canPlayMkv = supportedFormats.indexOf('mkv') != -1;
|
||||
var canPlayWebm = videoTestElement.canPlayType('video/webm').replace(/no/, '');
|
||||
// No real way to detect this, but it's too good to pass up
|
||||
var canPlayMkv = browser.chrome;
|
||||
|
||||
var profile = {};
|
||||
|
||||
|
@ -114,26 +84,29 @@ define(['browser'], function (browser) {
|
|||
|
||||
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
|
||||
// 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 (canPlayMp3) {
|
||||
if (supportsMp3VideoAudio) {
|
||||
videoAudioCodecs.push('mp3');
|
||||
}
|
||||
}
|
||||
if (canPlayAac) {
|
||||
if (videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.2"').replace(/no/, '')) {
|
||||
videoAudioCodecs.push('aac');
|
||||
}
|
||||
if (!canPlayMkv) {
|
||||
if (canPlayMp3) {
|
||||
if (supportsMp3VideoAudio) {
|
||||
videoAudioCodecs.push('mp3');
|
||||
}
|
||||
}
|
||||
if (canPlayAc3) {
|
||||
videoAudioCodecs.push('ac3');
|
||||
}
|
||||
|
||||
if (supportedFormats.indexOf('h264') != -1) {
|
||||
if (canPlayH264()) {
|
||||
profile.DirectPlayProfiles.push({
|
||||
Container: 'mp4,m4v',
|
||||
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({
|
||||
Container: audioFormat == 'webma' ? 'webma,webm' : audioFormat,
|
||||
Type: 'Audio'
|
||||
});
|
||||
}
|
||||
profile.DirectPlayProfiles.push({
|
||||
Container: audioFormat == 'webma' ? 'webma,webm' : audioFormat,
|
||||
Type: 'Audio'
|
||||
});
|
||||
});
|
||||
|
||||
if (canPlayWebm) {
|
||||
|
@ -170,24 +141,22 @@ define(['browser'], function (browser) {
|
|||
|
||||
profile.TranscodingProfiles = [];
|
||||
|
||||
['opus', 'mp3', 'aac'].forEach(function (audioFormat) {
|
||||
['opus', 'mp3', 'aac'].filter(canPlayAudioFormat).forEach(function (audioFormat) {
|
||||
|
||||
if (supportedFormats.indexOf(audioFormat) != -1) {
|
||||
profile.TranscodingProfiles.push({
|
||||
Container: audioFormat,
|
||||
Type: 'Audio',
|
||||
AudioCodec: audioFormat,
|
||||
Context: 'Streaming',
|
||||
Protocol: 'http'
|
||||
});
|
||||
profile.TranscodingProfiles.push({
|
||||
Container: audioFormat,
|
||||
Type: 'Audio',
|
||||
AudioCodec: audioFormat,
|
||||
Context: 'Static',
|
||||
Protocol: 'http'
|
||||
});
|
||||
}
|
||||
profile.TranscodingProfiles.push({
|
||||
Container: audioFormat,
|
||||
Type: 'Audio',
|
||||
AudioCodec: audioFormat,
|
||||
Context: 'Streaming',
|
||||
Protocol: 'http'
|
||||
});
|
||||
profile.TranscodingProfiles.push({
|
||||
Container: audioFormat,
|
||||
Type: 'Audio',
|
||||
AudioCodec: audioFormat,
|
||||
Context: 'Static',
|
||||
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
|
||||
|
@ -256,36 +225,31 @@ define(['browser'], function (browser) {
|
|||
|
||||
var videoAudioChannels = '6';
|
||||
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'VideoAudio',
|
||||
Codec: 'aac',
|
||||
Container: 'mkv,mov',
|
||||
Conditions: [
|
||||
{
|
||||
Condition: 'NotEquals',
|
||||
Property: 'AudioProfile',
|
||||
Value: 'HE-AAC'
|
||||
},
|
||||
{
|
||||
Condition: 'LessThanEqual',
|
||||
Property: 'AudioChannels',
|
||||
Value: videoAudioChannels
|
||||
},
|
||||
{
|
||||
Condition: 'Equals',
|
||||
Property: 'IsSecondaryAudio',
|
||||
Value: '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'
|
||||
//}
|
||||
]
|
||||
});
|
||||
// Handle he-aac not supported
|
||||
if (!videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.5"').replace(/no/, '')) {
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'VideoAudio',
|
||||
Codec: 'aac',
|
||||
Conditions: [
|
||||
{
|
||||
Condition: 'NotEquals',
|
||||
Property: 'AudioProfile',
|
||||
Value: 'HE-AAC'
|
||||
},
|
||||
{
|
||||
Condition: 'LessThanEqual',
|
||||
Property: 'AudioChannels',
|
||||
Value: videoAudioChannels
|
||||
},
|
||||
{
|
||||
Condition: 'Equals',
|
||||
Property: 'IsSecondaryAudio',
|
||||
Value: 'false',
|
||||
IsRequired: 'false'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
profile.CodecProfiles.push({
|
||||
Type: 'VideoAudio',
|
||||
|
|
|
@ -788,7 +788,7 @@
|
|||
showOverlayTimeout = setTimeout(function () {
|
||||
onShowTimerExpired(elem);
|
||||
|
||||
}, 1000);
|
||||
}, 1200);
|
||||
}
|
||||
|
||||
function preventTouchHover() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue