@4players/odin-plugin-web 1.0.0-alpha.6 → 1.0.0-alpha.8
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.
- package/{backend/lib → lib/plugin}/audioController.d.ts +3 -3
- package/{backend/lib → lib/plugin}/audioController.js +2 -2
- package/lib/wasm/index.js +19 -0
- package/{worker/lib → lib/worker}/common.d.ts +2 -1
- package/lib/worker/common.js +100 -0
- package/{worker/lib → lib/worker}/index.d.ts +1 -0
- package/lib/worker/index.js +2 -0
- package/{worker/lib → lib/worker}/messages.d.ts +1 -0
- package/lib/worker/messages.js +16 -0
- package/package.json +11 -12
- package/backend/lib/audioController.d.ts.map +0 -1
- package/backend/lib/audioController.js.map +0 -1
- package/backend/lib/config.d.ts.map +0 -1
- package/backend/lib/config.js.map +0 -1
- package/backend/lib/connectionPool.d.ts.map +0 -1
- package/backend/lib/connectionPool.js.map +0 -1
- package/backend/lib/index.d.ts.map +0 -1
- package/backend/lib/index.js.map +0 -1
- package/backend/lib/mainConnection.d.ts.map +0 -1
- package/backend/lib/mainConnection.js.map +0 -1
- package/backend/lib/roomConnection.d.ts.map +0 -1
- package/backend/lib/roomConnection.js.map +0 -1
- package/backend/lib/rpcConnection.d.ts.map +0 -1
- package/backend/lib/rpcConnection.js.map +0 -1
- package/backend/lib/token.d.ts.map +0 -1
- package/backend/lib/token.js.map +0 -1
- package/backend/package.json +0 -16
- package/wasm/lib/index.js +0 -19
- package/wasm/package.json +0 -14
- package/worker/lib/index.js +0 -2
- package/worker/package.json +0 -16
- /package/{backend/lib → lib/plugin}/config.d.ts +0 -0
- /package/{backend/lib → lib/plugin}/config.js +0 -0
- /package/{backend/lib → lib/plugin}/connectionPool.d.ts +0 -0
- /package/{backend/lib → lib/plugin}/connectionPool.js +0 -0
- /package/{backend/lib → lib/plugin}/index.d.ts +0 -0
- /package/{backend/lib → lib/plugin}/index.js +0 -0
- /package/{backend/lib → lib/plugin}/mainConnection.d.ts +0 -0
- /package/{backend/lib → lib/plugin}/mainConnection.js +0 -0
- /package/{backend/lib → lib/plugin}/roomConnection.d.ts +0 -0
- /package/{backend/lib → lib/plugin}/roomConnection.js +0 -0
- /package/{backend/lib → lib/plugin}/rpcConnection.d.ts +0 -0
- /package/{backend/lib → lib/plugin}/rpcConnection.js +0 -0
- /package/{backend/lib → lib/plugin}/token.d.ts +0 -0
- /package/{backend/lib → lib/plugin}/token.js +0 -0
- /package/{wasm/lib → lib/wasm}/index.d.ts +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Backend, Strand } from '@4players/odin-common';
|
|
2
2
|
import { DeviceParameters } from '.';
|
|
3
|
-
import { CaptureSink, PlaybackId, PlaybackWorker } from '
|
|
3
|
+
import { CaptureSink, PlaybackId, PlaybackWorker } from '../worker';
|
|
4
4
|
import { RoomConnection } from './roomConnection';
|
|
5
5
|
export type Volume = Backend.Volume;
|
|
6
6
|
export type Activity = Backend.Activity;
|
|
@@ -48,7 +48,7 @@ export declare class AudioController {
|
|
|
48
48
|
createAudioPlayback(parameters: CreateAudioPlaybackParameters): Promise<AudioPlayback>;
|
|
49
49
|
createAudioCapture(parameters: CreateAudioCaptureParameters): Promise<AudioCapture>;
|
|
50
50
|
enumerateDevices(): Promise<Device[]>;
|
|
51
|
-
playbackSetDevice(device
|
|
51
|
+
playbackSetDevice(device?: Device): Promise<void>;
|
|
52
52
|
playbackSetGlobalVolume(value: Backend.Volume): void;
|
|
53
53
|
playbackStart(uid: string, id: GlobalMediaId): void;
|
|
54
54
|
playbackStop(uid: string, id: GlobalMediaId): void;
|
|
@@ -87,7 +87,7 @@ export declare class AudioCapture implements Backend.AudioCapture {
|
|
|
87
87
|
get vad(): Backend.VadConfig;
|
|
88
88
|
get apm(): Backend.ApmConfig;
|
|
89
89
|
get volume(): Backend.Volume;
|
|
90
|
-
get activity(): import("
|
|
90
|
+
get activity(): import("../worker").Activity;
|
|
91
91
|
get speechProbability(): number;
|
|
92
92
|
constructor(controller: AudioController, parameters: CreateAudioCaptureParameters);
|
|
93
93
|
start(room: RoomConnection, media: GlobalMediaId, uid: Backend.UID): void;
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { Strand, assert, failure, sleep, success, } from '@4players/odin-common';
|
|
11
|
-
import { createCaptureWorker, createPlaybackWorker, silence, } from '
|
|
11
|
+
import { createCaptureWorker, createPlaybackWorker, silence, } from '../worker';
|
|
12
12
|
const defaultVad = {
|
|
13
13
|
voiceActivity: {
|
|
14
14
|
attackThreshold: 0.9,
|
|
@@ -161,7 +161,7 @@ export class AudioController {
|
|
|
161
161
|
else {
|
|
162
162
|
audioContext = this.playbackWorker.audioContext;
|
|
163
163
|
}
|
|
164
|
-
if (audioContext.setSinkId !== undefined) {
|
|
164
|
+
if (audioContext.setSinkId !== undefined && device && audioContext.state === 'running') {
|
|
165
165
|
yield audioContext.setSinkId(deviceId);
|
|
166
166
|
}
|
|
167
167
|
}));
|