]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/assets/player/peertube-player-manager.ts
Prevent console error with HLS fallback
[github/Chocobozzz/PeerTube.git] / client / src / assets / player / peertube-player-manager.ts
index 5db7a2e5562d3a8d4327063d6858b56893bc7999..9663d90a2be807db24b35a48320f6a7c86ec3481 100644 (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) {