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
4d618da015
commit
1fd4ea266c
7 changed files with 56 additions and 17 deletions
|
@ -15,12 +15,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.4.56",
|
"version": "1.4.57",
|
||||||
"_release": "1.4.56",
|
"_release": "1.4.57",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.4.56",
|
"tag": "1.4.57",
|
||||||
"commit": "2e223ca2b059e6af4bbf718d3bce601c714d608e"
|
"commit": "c0eea0e334d3c59e78193619463cc79913d62ffe"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.0",
|
"_target": "^1.2.0",
|
||||||
|
|
|
@ -49,7 +49,19 @@ define(['browser'], function (browser) {
|
||||||
|
|
||||||
var typeString;
|
var typeString;
|
||||||
|
|
||||||
if (format == 'opus') {
|
if (format == 'flac') {
|
||||||
|
if (browser.tizen) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (format == 'wma') {
|
||||||
|
if (browser.tizen) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (format == 'opus') {
|
||||||
typeString = 'audio/ogg; codecs="opus"';
|
typeString = 'audio/ogg; codecs="opus"';
|
||||||
|
|
||||||
if (document.createElement('audio').canPlayType(typeString).replace(/no/, '')) {
|
if (document.createElement('audio').canPlayType(typeString).replace(/no/, '')) {
|
||||||
|
@ -258,7 +270,7 @@ define(['browser'], function (browser) {
|
||||||
profile.DirectPlayProfiles.push(i);
|
profile.DirectPlayProfiles.push(i);
|
||||||
});
|
});
|
||||||
|
|
||||||
['opus', 'mp3', 'aac', 'flac', 'webma'].filter(canPlayAudioFormat).forEach(function (audioFormat) {
|
['opus', 'mp3', 'aac', 'flac', 'webma', 'wma'].filter(canPlayAudioFormat).forEach(function (audioFormat) {
|
||||||
|
|
||||||
profile.DirectPlayProfiles.push({
|
profile.DirectPlayProfiles.push({
|
||||||
Container: audioFormat == 'webma' ? 'webma,webm' : audioFormat,
|
Container: audioFormat == 'webma' ? 'webma,webm' : audioFormat,
|
||||||
|
|
|
@ -45,6 +45,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function enableAnimation() {
|
||||||
|
if (browser.tv) {
|
||||||
|
// too slow
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
EmbyButtonPrototype.attachedCallback = function () {
|
EmbyButtonPrototype.attachedCallback = function () {
|
||||||
|
|
||||||
if (this.getAttribute('data-embybutton') == 'true') {
|
if (this.getAttribute('data-embybutton') == 'true') {
|
||||||
|
@ -57,12 +65,14 @@
|
||||||
this.classList.add('noflex');
|
this.classList.add('noflex');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.addEventListener('keydown', onKeyDown);
|
if (enableAnimation()) {
|
||||||
if (browser.safari) {
|
this.addEventListener('keydown', onKeyDown);
|
||||||
this.addEventListener('click', animateButton);
|
if (browser.safari) {
|
||||||
} else {
|
this.addEventListener('click', animateButton);
|
||||||
this.addEventListener('mousedown', onMouseDown);
|
} else {
|
||||||
//this.addEventListener('touchstart', animateButton);
|
this.addEventListener('mousedown', onMouseDown);
|
||||||
|
//this.addEventListener('touchstart', animateButton);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
define(['css!./emby-button', 'registerElement'], function () {
|
define(['browser', 'css!./emby-button', 'registerElement'], function (browser) {
|
||||||
|
|
||||||
var EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
|
var EmbyButtonPrototype = Object.create(HTMLButtonElement.prototype);
|
||||||
|
|
||||||
|
function enableAnimation() {
|
||||||
|
if (browser.tv) {
|
||||||
|
// too slow
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
function animateButtonInternal(e, btn) {
|
function animateButtonInternal(e, btn) {
|
||||||
|
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
|
@ -46,8 +54,10 @@
|
||||||
|
|
||||||
this.setAttribute('data-embybutton', 'true');
|
this.setAttribute('data-embybutton', 'true');
|
||||||
|
|
||||||
this.addEventListener('keydown', onKeyDown);
|
if (enableAnimation()) {
|
||||||
this.addEventListener('click', animateButton);
|
this.addEventListener('keydown', onKeyDown);
|
||||||
|
this.addEventListener('click', animateButton);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
document.registerElement('paper-icon-button-light', {
|
document.registerElement('paper-icon-button-light', {
|
||||||
|
|
|
@ -8,6 +8,11 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Doesn't seem to work at all
|
||||||
|
if (browser.tizen) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Take advantage of the native input methods
|
// Take advantage of the native input methods
|
||||||
if (browser.tv) {
|
if (browser.tv) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -120,13 +125,15 @@
|
||||||
inputId++;
|
inputId++;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.removeEventListener('mousedown', onMouseDown);
|
|
||||||
this.removeEventListener('keydown', onKeyDown);
|
|
||||||
this.removeEventListener('focus', onFocus);
|
this.removeEventListener('focus', onFocus);
|
||||||
this.removeEventListener('blur', onBlur);
|
this.removeEventListener('blur', onBlur);
|
||||||
|
|
||||||
|
this.removeEventListener('mousedown', onMouseDown);
|
||||||
|
this.removeEventListener('keydown', onKeyDown);
|
||||||
|
|
||||||
this.addEventListener('mousedown', onMouseDown);
|
this.addEventListener('mousedown', onMouseDown);
|
||||||
this.addEventListener('keydown', onKeyDown);
|
this.addEventListener('keydown', onKeyDown);
|
||||||
|
|
||||||
this.addEventListener('focus', onFocus);
|
this.addEventListener('focus', onFocus);
|
||||||
this.addEventListener('blur', onBlur);
|
this.addEventListener('blur', onBlur);
|
||||||
};
|
};
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue