mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-12 18:39:58 +00:00
Ensure returned receivers from StatusManager have a valid status
This commit is contained in:
@@ -55,8 +55,13 @@ export default new class StatusManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public getReceivers () {
|
public * getReceivers() {
|
||||||
return Array.from(this.receivers.values());
|
for (const [, receiver ] of this.receivers) {
|
||||||
|
if (receiver.status && receiver.status.application
|
||||||
|
&& receiver.status.volume) {
|
||||||
|
yield receiver;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async createBridgePort () {
|
private async createBridgePort () {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ async function getSelection (
|
|||||||
await StatusManager.init();
|
await StatusManager.init();
|
||||||
|
|
||||||
sharedSelector.open(
|
sharedSelector.open(
|
||||||
StatusManager.getReceivers()
|
Array.from(StatusManager.getReceivers())
|
||||||
, defaultMediaType
|
, defaultMediaType
|
||||||
, availableMediaTypes);
|
, availableMediaTypes);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user