vjs: hide errors when updating i18n #7004
1 changed files with 43 additions and 38 deletions
|
@ -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.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue