Add better support for handling device capabilities and receiver objects

This commit is contained in:
hensm
2022-04-17 07:49:01 +01:00
parent 1da709eb5e
commit b672b8d722
13 changed files with 159 additions and 77 deletions

View File

@@ -27,13 +27,15 @@ export default class Remote extends CastClient {
constructor(private host: string, private options?: CastRemoteOptions) {
super();
super.connect(host, {
onReceiverMessage: message => {
this.onReceiverMessage(message);
}
}).then(() => {
this.sendReceiverMessage({ type: "GET_STATUS" });
});
super
.connect(host, {
onReceiverMessage: message => {
this.onReceiverMessage(message);
}
})
.then(() => {
this.sendReceiverMessage({ type: "GET_STATUS" });
});
}
disconnect() {