add raop back
This commit is contained in:
parent
d8e4e58488
commit
079008d5a4
2 changed files with 5 additions and 3 deletions
|
@ -39,6 +39,7 @@
|
||||||
"@sentry/electron": "^3.0.7",
|
"@sentry/electron": "^3.0.7",
|
||||||
"@sentry/integrations": "^6.19.6",
|
"@sentry/integrations": "^6.19.6",
|
||||||
"adm-zip": "0.4.10",
|
"adm-zip": "0.4.10",
|
||||||
|
"airtunes2": "git+https://github.com/vapormusic/node_airtunes2.git",
|
||||||
"castv2-client": "^1.2.0",
|
"castv2-client": "^1.2.0",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"discord-rpc": "^4.0.1",
|
"discord-rpc": "^4.0.1",
|
||||||
|
|
|
@ -20,10 +20,10 @@ export default class RAOP {
|
||||||
private _app: any;
|
private _app: any;
|
||||||
private _store: any;
|
private _store: any;
|
||||||
private _cacheAttr: any;
|
private _cacheAttr: any;
|
||||||
|
private u: any;
|
||||||
private ipairplay: any = "";
|
private ipairplay: any = "";
|
||||||
private portairplay: any = "";
|
private portairplay: any = "";
|
||||||
private u = require('airtunes2');
|
|
||||||
private airtunes: any;
|
private airtunes: any;
|
||||||
private device: any;
|
private device: any;
|
||||||
private mdns = require('mdns-js');
|
private mdns = require('mdns-js');
|
||||||
|
@ -132,6 +132,7 @@ export default class RAOP {
|
||||||
* Runs on app ready
|
* Runs on app ready
|
||||||
*/
|
*/
|
||||||
onReady(win: any): void {
|
onReady(win: any): void {
|
||||||
|
this.u = require('airtunes2');
|
||||||
this._win = win;
|
this._win = win;
|
||||||
|
|
||||||
electron.ipcMain.on('getKnownAirplayDevices', (event) => {
|
electron.ipcMain.on('getKnownAirplayDevices', (event) => {
|
||||||
|
@ -146,7 +147,7 @@ export default class RAOP {
|
||||||
browser.on('ready', browser.discover);
|
browser.on('ready', browser.discover);
|
||||||
|
|
||||||
browser.on('update', (service: any) => {
|
browser.on('update', (service: any) => {
|
||||||
if (service.addresses && service.fullname && service.fullname.includes('_raop._tcp')) {
|
if (service.addresses && service.fullname && (service.fullname.includes('_raop._tcp') || service.fullname.includes('_airplay._tcp'))) {
|
||||||
console.log(service.txt)
|
console.log(service.txt)
|
||||||
this._win.webContents.executeJavaScript(`console.log(
|
this._win.webContents.executeJavaScript(`console.log(
|
||||||
"${service.name} ${service.host}:${service.port} ${service.addresses}"
|
"${service.name} ${service.host}:${service.port} ${service.addresses}"
|
Loading…
Add table
Add a link
Reference in a new issue