mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-09 17:19:59 +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 () {
|
||||
return Array.from(this.receivers.values());
|
||||
public * getReceivers() {
|
||||
for (const [, receiver ] of this.receivers) {
|
||||
if (receiver.status && receiver.status.application
|
||||
&& receiver.status.volume) {
|
||||
yield receiver;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async createBridgePort () {
|
||||
|
||||
@@ -102,7 +102,7 @@ async function getSelection (
|
||||
await StatusManager.init();
|
||||
|
||||
sharedSelector.open(
|
||||
StatusManager.getReceivers()
|
||||
Array.from(StatusManager.getReceivers())
|
||||
, defaultMediaType
|
||||
, availableMediaTypes);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user