Fix video and audio playback to pause on window close

This commit is contained in:
ayumi-signal 2024-02-02 15:39:32 -08:00 committed by GitHub
parent d215e1b9be
commit 96131112da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 98 additions and 1 deletions

View file

@ -239,6 +239,16 @@ ipc.on('power-channel:lock-screen', () => {
window.Whisper.events.trigger('powerMonitorLockScreen');
});
ipc.on(
'set-media-playback-disabled',
(_event: unknown, playbackDisabled: unknown) => {
const { setMediaPlaybackDisabled } = window.Events || {};
if (setMediaPlaybackDisabled) {
setMediaPlaybackDisabled(Boolean(playbackDisabled));
}
}
);
ipc.on('window:set-window-stats', (_event, stats) => {
if (!window.reduxActions) {
return;