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:
parent
f805bef9e5
commit
6aa0d7c318
3 changed files with 16 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue