1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Add error message

This commit is contained in:
Dmitry Lyzo 2020-10-29 23:52:52 +03:00
parent f805bef9e5
commit 6aa0d7c318
3 changed files with 16 additions and 4 deletions

View file

@ -5,6 +5,14 @@ import loading from 'loading';
/* globals YT */
const errorCodes = {
2: 'YoutubeBadRequest',
5: 'YoutubePlaybackError',
100: 'YoutubeNotFound',
101: 'YoutubeDenied',
150: 'YoutubeDenied'
};
function zoomIn(elem, iterations) {
const keyframes = [
{ transform: 'scale3d(.2, .2, .2) ', opacity: '.6', offset: 0 },
@ -143,7 +151,7 @@ function setCurrentSrc(instance, elem, options) {
events.trigger(instance, 'pause');
}
},
'onError': () => reject()
'onError': (e) => reject(errorCodes[e.data] || '') // FIXME: default error code/text?
},
playerVars: {
controls: 0,