Skip to content

Commit

Permalink
Lily/Video: pause videos when project paused (#1871)
Browse files Browse the repository at this point in the history
Fixes #1671
  • Loading branch information
fath11 authored Jan 15, 2025
1 parent e65922c commit 877fc29
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions extensions/Lily/Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 877fc29

Please sign in to comment.