This commit is contained in:
2024-11-24 18:03:06 +00:00
parent 641938f7e4
commit 16ba22d90b
39 changed files with 76 additions and 254 deletions

View File

@@ -13,6 +13,7 @@ export class WebRtcChannelCaster extends MessageEmitter implements JsonChannelCa
constructor(
private channel: JsonChannelCaster,
{onOpen}:Partial<{onOpen: Function}> = {},
// @ts-ignore
private ctx: RemoteDeviceManagerCtx
) {
super();
@@ -144,6 +145,7 @@ export class WebRtcChannelSummon extends MessageEmitter implements JsonChannelSu
};
this.peer.ondatachannel = (event) => {
if (event.channel.label === 'video') {
// @ts-ignore
this.videoChannel = event.channel;
} else if (event.channel.label === 'json') {
this.dataChannel = event.channel;