vjs: hide errors when updating i18n #7004

Merged
infinite-persistence merged 1 commit from ip/vjs.i18n into master 2021-09-02 18:38:58 +02:00

View file

@ -296,6 +296,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
// as the listener to update static texts.
const player = playerRef.current;
if (player) {
try {
const controlBar = player.getChild('controlBar');
switch (e.type) {
case 'play':
@ -335,6 +336,10 @@ export default React.memo<Props>(function VideoJs(props: Props) {
if (isDev) throw Error('Unexpected: ' + e.type);
break;
}
} catch {
// Just fail silently. It'll just be due to hidden ctrls, and if it is
// due to control hierarchy change, we'll notice that in the GUI.
}
}
}