mute desktop audio when homepod is playing
This commit is contained in:
parent
fa20e222e0
commit
f5a816467f
1 changed files with 2 additions and 0 deletions
|
@ -170,6 +170,7 @@ export default class RAOP {
|
|||
this.device.on('status', (status: any) => {
|
||||
console.log('device status', status);
|
||||
if (status == "ready"){
|
||||
this._win.webContents.setAudioMuted(true);
|
||||
this._win.webContents.executeJavaScript(`CiderAudio.sendAudio()`).catch((err: any) => console.error(err));
|
||||
}
|
||||
if (status == 'stopped') {
|
||||
|
@ -256,6 +257,7 @@ export default class RAOP {
|
|||
|
||||
|
||||
electron.ipcMain.on('disconnectAirplay', (event) => {
|
||||
this._win.webContents.setAudioMuted(false);
|
||||
this.airtunes.stopAll(function () {
|
||||
console.log('end');
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue