mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
53c2a5fe3c
commit
24ad560e5a
16 changed files with 223 additions and 126 deletions
|
@ -15,12 +15,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.0.24",
|
||||
"_release": "1.0.24",
|
||||
"version": "1.0.26",
|
||||
"_release": "1.0.26",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.0.24",
|
||||
"commit": "ab1c97700a5059e3522a8ec5c43fa33ee36d6e20"
|
||||
"tag": "1.0.26",
|
||||
"commit": "f3cd4149e26d75861ab29a3e44647195bb97728b"
|
||||
},
|
||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "~1.0.0",
|
||||
|
|
|
@ -84,18 +84,21 @@ 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 (canPlayMkv) {
|
||||
if (canPlayAudioFormat('mp3')) {
|
||||
if (supportsMp3VideoAudio) {
|
||||
videoAudioCodecs.push('mp3');
|
||||
}
|
||||
}
|
||||
if (canPlayAudioFormat('aac')) {
|
||||
if (videoTestElement.canPlayType('video/mp4; codecs="avc1.640029, mp4a.40.2"').replace(/no/, '')) {
|
||||
videoAudioCodecs.push('aac');
|
||||
}
|
||||
if (!canPlayMkv) {
|
||||
if (canPlayAudioFormat('mp3')) {
|
||||
if (supportsMp3VideoAudio) {
|
||||
videoAudioCodecs.push('mp3');
|
||||
}
|
||||
}
|
||||
|
@ -222,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',
|
||||
|
|
|
@ -35,8 +35,6 @@ define(function () {
|
|||
|
||||
var url = cssId + '.css';
|
||||
|
||||
var packageName = '';
|
||||
|
||||
if (url.indexOf('http') != 0 && url.indexOf('file:') != 0) {
|
||||
url = config.baseUrl + url;
|
||||
}
|
||||
|
@ -46,10 +44,6 @@ define(function () {
|
|||
|
||||
var link = document.createElement('link');
|
||||
|
||||
if (packageName) {
|
||||
link.setAttribute('data-package', packageName);
|
||||
}
|
||||
|
||||
link.setAttribute('rel', 'stylesheet');
|
||||
link.setAttribute('type', 'text/css');
|
||||
link.onload = load;
|
||||
|
@ -61,18 +55,10 @@ define(function () {
|
|||
}
|
||||
|
||||
window.requireCss = {
|
||||
unloadPackage: function (packageName) {
|
||||
removeStylesheet: function (stylesheet) {
|
||||
|
||||
// Todo: unload css here
|
||||
var stylesheets = document.head.querySelectorAll("link[data-package='" + packageName + "']");
|
||||
for (var i = 0, length = stylesheets.length; i < length; i++) {
|
||||
|
||||
var stylesheet = stylesheets[i];
|
||||
|
||||
console.log('Unloading stylesheet: ' + stylesheet.href);
|
||||
stylesheet.parentNode.removeChild(stylesheet);
|
||||
removeFromLoadHistory(stylesheet.href);
|
||||
}
|
||||
stylesheet.parentNode.removeChild(stylesheet);
|
||||
removeFromLoadHistory(stylesheet.href);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue