@livekit/rtc-node
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -18,2 +18,3 @@ import EventEmitter from 'events'; | ||
super(); | ||
this.setMaxListeners(0); | ||
livekitInitialize((event_data) => { | ||
@@ -20,0 +21,0 @@ const event = FfiEvent.fromBinary(event_data); |
@@ -93,2 +93,5 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. | ||
}); | ||
if (cb.error) { | ||
throw new Error(cb.error); | ||
} | ||
const track_publication = new LocalTrackPublication(cb.publication); | ||
@@ -107,5 +110,8 @@ track_publication.track = track; | ||
}); | ||
await FfiClient.instance.waitFor((ev) => { | ||
const cb = await FfiClient.instance.waitFor((ev) => { | ||
return ev.message.case == 'unpublishTrack' && ev.message.value.asyncId == res.asyncId; | ||
}); | ||
if (cb.error) { | ||
throw new Error(cb.error); | ||
} | ||
const pub = this.trackPublications.get(trackSid); | ||
@@ -112,0 +118,0 @@ pub.track = undefined; |
@@ -230,3 +230,3 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. | ||
}); | ||
FfiClient.instance.removeAllListeners(); | ||
FfiClient.instance.removeListener(FfiClientEvent.FfiEvent, this.onFfiEvent); | ||
this.removeAllListeners(); | ||
@@ -233,0 +233,0 @@ } |
@@ -6,3 +6,3 @@ { | ||
"author": "LiveKit", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"main": "dist/index.js", | ||
@@ -47,7 +47,7 @@ "types": "dist/index.d.ts", | ||
"optionalDependencies": { | ||
"@livekit/rtc-node-darwin-arm64": "0.5.0", | ||
"@livekit/rtc-node-darwin-x64": "0.5.0", | ||
"@livekit/rtc-node-linux-arm64-gnu": "0.5.0", | ||
"@livekit/rtc-node-linux-x64-gnu": "0.5.0", | ||
"@livekit/rtc-node-win32-x64-msvc": "0.5.0" | ||
"@livekit/rtc-node-darwin-arm64": "0.5.1", | ||
"@livekit/rtc-node-darwin-x64": "0.5.1", | ||
"@livekit/rtc-node-linux-arm64-gnu": "0.5.1", | ||
"@livekit/rtc-node-linux-x64-gnu": "0.5.1", | ||
"@livekit/rtc-node-win32-x64-msvc": "0.5.1" | ||
}, | ||
@@ -54,0 +54,0 @@ "engines": { |
@@ -39,2 +39,3 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. | ||
super(); | ||
this.setMaxListeners(0); | ||
@@ -41,0 +42,0 @@ livekitInitialize((event_data: Uint8Array) => { |
@@ -159,2 +159,6 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. | ||
if (cb.error) { | ||
throw new Error(cb.error); | ||
} | ||
const track_publication = new LocalTrackPublication(cb.publication); | ||
@@ -177,6 +181,10 @@ track_publication.track = track; | ||
await FfiClient.instance.waitFor<UnpublishTrackCallback>((ev) => { | ||
const cb = await FfiClient.instance.waitFor<UnpublishTrackCallback>((ev) => { | ||
return ev.message.case == 'unpublishTrack' && ev.message.value.asyncId == res.asyncId; | ||
}); | ||
if (cb.error) { | ||
throw new Error(cb.error); | ||
} | ||
const pub = this.trackPublications.get(trackSid); | ||
@@ -183,0 +191,0 @@ pub.track = undefined; |
@@ -160,3 +160,3 @@ // SPDX-FileCopyrightText: 2024 LiveKit, Inc. | ||
FfiClient.instance.removeAllListeners(); | ||
FfiClient.instance.removeListener(FfiClientEvent.FfiEvent, this.onFfiEvent); | ||
this.removeAllListeners(); | ||
@@ -163,0 +163,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1581073
27185