diff --git a/extensions/Lily/Video.js b/extensions/Lily/Video.js index 879625c06a..63a92a6275 100644 --- a/extensions/Lily/Video.js +++ b/extensions/Lily/Video.js @@ -144,6 +144,24 @@ } } }); + + runtime.on("RUNTIME_PAUSED", () => { + for (const skin of renderer._allSkins) { + if (skin instanceof VideoSkin) { + skin.videoElement.pause(); + skin.markVideoDirty(); + } + } + }); + + runtime.on("RUNTIME_UNPAUSED", () => { + for (const skin of renderer._allSkins) { + if (skin instanceof VideoSkin) { + skin.videoElement.play(); + skin.markVideoDirty(); + } + } + }); } getInfo() {