some raop fix

This commit is contained in:
vapormusic 2022-08-27 22:37:03 +07:00
parent e2b5d3161c
commit 4c34f22ea1
3 changed files with 12 additions and 2 deletions

View file

@ -236,6 +236,7 @@ export default class RAOP {
this.airtunes.stopAll(() => { this.airtunes.stopAll(() => {
console.log("end"); console.log("end");
}); });
this._win.webContents.executeJavaScript(`app.airplayDisconnect(true, ${[ipv4, ipport, sepassword, title, artist, album, artworkURL, txt, airplay2dv]})`).catch((err: any) => console.error(err));
this.airtunes = null; this.airtunes = null;
this.device = null; this.device = null;
this.ipairplay = ""; this.ipairplay = "";
@ -322,6 +323,7 @@ export default class RAOP {
this.airtunes.stopAll(function () { this.airtunes.stopAll(function () {
console.log("end"); console.log("end");
}); });
this._win.webContents.executeJavaScript('app.airplayDisconnect(false)').catch((err: any) => console.error(err));
this.airtunes = null; this.airtunes = null;
this.device = null; this.device = null;
this.ipairplay = ""; this.ipairplay = "";

View file

@ -397,7 +397,7 @@ const CiderAudio = {
constructor() { constructor() {
super(); super();
this._bufferSize = 128; this._bufferSize = 1024;
this._buffers = null; this._buffers = null;
this._initBuffer(); this._initBuffer();
} }

View file

@ -4340,7 +4340,15 @@ const app = new Vue({
notyf.success("Device paired successfully!"); notyf.success("Device paired successfully!");
}, },
sendAirPlayFailed() { sendAirPlayFailed() {
notyf.error("Device paring failed!"); notyf.success("Device paring failed!");
},
airplayDisconnect(dropped, array = []) {
if (dropped){
let [ipv4, ipport, sepassword, title, artist, album, artworkURL, txt, airplay2dv] = array
ipcRenderer.send("performAirplayPCM", ipv4, ipport, sepassword, title, artist, album, artworkURL, txt, airplay2dv)
} else {
app.activeCasts = [];
notyf.error("Devices disconnected!");}
}, },
windowFocus(val) { windowFocus(val) {
if (val) { if (val) {