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

@@ -174,7 +174,7 @@ async function getSelection(
logger.info("Selected receiver", ev.detail);
resolve({
actionType: ReceiverSelectionActionType.Cast,
receiver: ev.detail.receiver,
receiverDevice: ev.detail.receiverDevice,
mediaType: ev.detail.mediaType,
filePath: ev.detail.filePath
});
@@ -203,11 +203,11 @@ async function getSelection(
"stop",
storeListener("stop", async ev => {
logger.info("Stopping receiver app...", ev.detail);
receiverDevices.stopReceiverApp(ev.detail.receiver.id);
receiverDevices.stopReceiverApp(ev.detail.receiverDevice.id);
resolve({
actionType: ReceiverSelectionActionType.Stop,
receiver: ev.detail.receiver
receiverDevice: ev.detail.receiverDevice
});
removeListeners();
})