1
0
Fork 0

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
This commit is contained in:
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

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()
}