add try/catch
This commit is contained in:
@ -133,13 +133,16 @@ class Screen
|
|||||||
const canvas = this.canvasVideo;
|
const canvas = this.canvasVideo;
|
||||||
const video = canvas.video;
|
const video = canvas.video;
|
||||||
const texture = this.screen.material.map;
|
const texture = this.screen.material.map;
|
||||||
|
try {
|
||||||
if (video)
|
if (video)
|
||||||
{
|
{
|
||||||
video.pause();
|
video.pause();
|
||||||
video.src = '';
|
video.src = '';
|
||||||
video.removeAttribute('src');
|
video.removeAttribute('src');
|
||||||
video.load();
|
video.load();
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
// Do nothing
|
||||||
}
|
}
|
||||||
if (texture)
|
if (texture)
|
||||||
texture.dispose();
|
texture.dispose();
|
||||||
|
Reference in New Issue
Block a user