@lvce-editor/api 9.2.0 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  export interface StartWebRpcAudioStreamOptions {
2
2
  readonly elementLocator: string;
3
3
  readonly ephemeralKey: string;
4
- readonly onData: (data: string) => void;
4
+ readonly port: MessagePort;
5
5
  readonly trackAudioData: boolean;
6
6
  readonly uid: number;
7
7
  }
@@ -1,14 +1,6 @@
1
1
  import { ExtensionManagementWorker } from '@lvce-editor/rpc-registry';
2
2
  export const startWebRtcAudioStream = async (options) => {
3
- const { onData, ...rest } = options;
4
- const { port1, port2 } = new MessageChannel();
5
- port2.onmessage = (event) => {
6
- onData(event.data);
7
- };
8
- return await ExtensionManagementWorker.invokeAndTransfer('WebRtc.startWebRtcAudioStream', {
9
- ...rest,
10
- port: port1,
11
- });
3
+ return await ExtensionManagementWorker.invokeAndTransfer('WebRtc.startWebRtcAudioStream', options);
12
4
  };
13
5
  export const setRemoteDescription = async (options) => {
14
6
  await ExtensionManagementWorker.invoke('WebRtc.setRemoteDescription', options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/api",
3
- "version": "9.2.0",
3
+ "version": "9.3.0",
4
4
  "description": "Tree-shakeable extension API for Lvce Editor extensions.",
5
5
  "keywords": [
6
6
  "lvce-editor",