]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Don't break player on ice error
authorChocobozzz <me@florianbigard.com>
Mon, 20 Jun 2022 07:57:46 +0000 (09:57 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 20 Jun 2022 07:57:46 +0000 (09:57 +0200)
I don't really know why the ice error is not catched by simple-peer,
where it should according to the code

client/src/standalone/videos/embed.html

index f30dda96b4bba5d64d9e454005cb79e5c4921f1d..eab6f81a66ff367d4d06d5367fd228e5fad53c61 100644 (file)
         if (placeholderPreview) placeholderPreview.style.display = 'none'
       }
 
-      window.onerror = function () {
+      window.onerror = function (msg) {
+        if (typeof msg === 'string' && msg.toLowerCase().includes(' ice ')) {
+          console.warn(msg)
+          return
+        }
+
         window.displayIncompatibleBrowser()
       }