Avoid crashing all embed on uncaught error

pull/6544/head
Chocobozzz 2024-08-06 16:34:58 +02:00
parent 21215122a8
commit eb86c3d407
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 9 additions and 0 deletions

View File

@ -95,6 +95,15 @@
return
}
// Video element is already created, don't crash the player
if (document.querySelector('.vjs-can-play')) {
if (window.logger && typeof window.logger.error === 'function') {
window.logger.error('Uncaught error in embed player ', err)
}
return
}
window.displayIncompatibleBrowser(err)
if (window.logger && typeof window.logger.error === 'function') {