Prevent console error with HLS fallback
This commit is contained in:
parent
b9b3d18dd9
commit
f746622be4
|
@ -167,7 +167,7 @@ export class PeertubePlayerManager {
|
|||
}
|
||||
|
||||
private static async tryToRecoverHLSError (err: any, currentPlayer: videojs.Player, options: PeertubePlayerManagerOptions) {
|
||||
if (err.code === 3) { // Decode error
|
||||
if (err.code === MediaError.MEDIA_ERR_DECODE) {
|
||||
|
||||
// Display a notification to user
|
||||
if (this.videojsDecodeErrors === 0) {
|
||||
|
|
|
@ -19,6 +19,9 @@ class UpNextPlugin extends Plugin {
|
|||
|
||||
super(player)
|
||||
|
||||
// UpNext plugin can be called later, so ensure the player is not disposed
|
||||
if (this.player.isDisposed()) return
|
||||
|
||||
this.player.ready(() => {
|
||||
player.addClass('vjs-upnext')
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue