mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 01:59:58 +00:00
Cast API overhaul (#173)
Re-write the shim<->bridge messaging interface and session creation/update handling for better accuracy.
This commit is contained in:
@@ -41,7 +41,7 @@ export default new class ShimManager {
|
||||
for (const shim of this.activeShims) {
|
||||
shim.contentPort.postMessage({
|
||||
subject: "shim:serviceUp"
|
||||
, data: { id: ev.detail.receiverDevice.id }
|
||||
, data: { receiverDevice: ev.detail.receiverDevice }
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -50,7 +50,7 @@ export default new class ShimManager {
|
||||
for (const shim of this.activeShims) {
|
||||
shim.contentPort.postMessage({
|
||||
subject: "shim:serviceDown"
|
||||
, data: { id: ev.detail.receiverDeviceId }
|
||||
, data: { receiverDeviceId: ev.detail.receiverDeviceId }
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -173,7 +173,7 @@ export default new class ShimManager {
|
||||
for (const receiverDevice of receiverDevices.getDevices()) {
|
||||
shim.contentPort.postMessage({
|
||||
subject: "shim:serviceUp"
|
||||
, data: { id: receiverDevice.id }
|
||||
, data: { receiverDevice }
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ export default new class extends TypedEventTarget<EventMap> {
|
||||
const receiverDevice = this.receiverDevices.get(receiverDeviceId);
|
||||
if (receiverDevice) {
|
||||
this.bridgePort.postMessage({
|
||||
subject: "bridge:stopReceiverApp"
|
||||
subject: "bridge:stopCastApp"
|
||||
, data: { receiverDevice }
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user