Don't break player on ice error

I don't really know why the ice error is not catched by simple-peer,
where it should according to the code
pull/5023/head
Chocobozzz 2022-06-20 09:57:46 +02:00
parent 5e0dbb3e52
commit da8637bac9
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 6 additions and 1 deletions

View File

@ -67,7 +67,12 @@
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()
}