Fix video and audio playback to pause on window close
This commit is contained in:
parent
d215e1b9be
commit
96131112da
9 changed files with 98 additions and 1 deletions
|
@ -119,6 +119,7 @@ export type IPCEventsCallbacksType = {
|
|||
removeDarkOverlay: () => void;
|
||||
resetAllChatColors: () => void;
|
||||
resetDefaultChatColor: () => void;
|
||||
setMediaPlaybackDisabled: (playbackDisabled: boolean) => void;
|
||||
showConversationViaNotification: (data: NotificationClickData) => void;
|
||||
showConversationViaSignalDotMe: (
|
||||
kind: string,
|
||||
|
@ -640,6 +641,13 @@ export function createIPCEvents(
|
|||
getMediaPermissions: window.IPC.getMediaPermissions,
|
||||
getMediaCameraPermissions: window.IPC.getMediaCameraPermissions,
|
||||
|
||||
setMediaPlaybackDisabled: (playbackDisabled: boolean) => {
|
||||
window.reduxActions.lightbox.setPlaybackDisabled(playbackDisabled);
|
||||
if (playbackDisabled) {
|
||||
window.reduxActions.audioPlayer.pauseVoiceNotePlayer();
|
||||
}
|
||||
},
|
||||
|
||||
...overrideEvents,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue