Prevent console error with HLS fallback

This commit is contained in:
Chocobozzz 2022-10-31 10:33:37 +01:00
parent b9b3d18dd9
commit f746622be4
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
2 changed files with 4 additions and 1 deletions

View File

@ -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) {

View File

@ -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')
})