@lvce-editor/api 9.27.0 → 9.28.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.
package/dist/index.d.ts
CHANGED
|
@@ -60,4 +60,4 @@ export type { RegisteredSourceControlProvider, SourceControlProvider, SourceCont
|
|
|
60
60
|
export type { ShowQuickPickOptions } from './parts/ShowQuickPickOptions/ShowQuickPickOptions.ts';
|
|
61
61
|
export type { StatusBarItem, StatusBarItemProvider, StatusBarItemProviderHandle, StatusBarItemProviderRegistrySnapshot, } from './parts/StatusBar/StatusBar.ts';
|
|
62
62
|
export { setRemoteDescription, startWebRtcAudioStream, stopWebRtcAudioStream, readMicLevels } from './parts/WebRtc/WebRtc.ts';
|
|
63
|
-
export type { SetRemoteDescriptionOptions, StartWebRpcAudioStreamOptions,
|
|
63
|
+
export type { MicLevelsResult, ReadMicLevelOptions, SetRemoteDescriptionOptions, StartWebRpcAudioStreamOptions, WebRtcAudioConstraints, } from './parts/WebRtc/WebRtc.ts';
|
|
@@ -2,12 +2,16 @@ import { ExtensionManagementWorker, FileSystemWorker } from '@lvce-editor/rpc-re
|
|
|
2
2
|
import { executeCommand } from "../ExecuteCommand/ExecuteCommand.js";
|
|
3
3
|
import { getPlatform } from "../Platform/Platform.js";
|
|
4
4
|
const MemfsPrefix = 'memfs://';
|
|
5
|
+
const FilePrefix = 'file://';
|
|
5
6
|
const isMemory = (uri) => {
|
|
6
7
|
return uri.startsWith(MemfsPrefix);
|
|
7
8
|
};
|
|
8
9
|
const isHttp = (uri) => {
|
|
9
10
|
return uri.startsWith('http://') || uri.startsWith('https://');
|
|
10
11
|
};
|
|
12
|
+
const isCustomFileSystemUri = (uri) => {
|
|
13
|
+
return uri.includes('://') && !uri.startsWith(FilePrefix);
|
|
14
|
+
};
|
|
11
15
|
const getRemoteUrl = (uri) => {
|
|
12
16
|
const withoutPrefix = uri.startsWith('file://') ? uri.slice('file://'.length) : uri;
|
|
13
17
|
const normalized = withoutPrefix.replaceAll('\\', '/');
|
|
@@ -17,7 +21,7 @@ const getObjectUrl = async (uri) => {
|
|
|
17
21
|
if (isHttp(uri)) {
|
|
18
22
|
return uri;
|
|
19
23
|
}
|
|
20
|
-
if (isMemory(uri)) {
|
|
24
|
+
if (isMemory(uri) || isCustomFileSystemUri(uri)) {
|
|
21
25
|
return (await executeCommand('Blob.getSrc', uri));
|
|
22
26
|
}
|
|
23
27
|
const platform = await getPlatform();
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
export interface WebRtcAudioConstraints {
|
|
2
|
+
readonly autoGainControl?: boolean;
|
|
3
|
+
readonly echoCancellation?: boolean;
|
|
4
|
+
readonly noiseSuppression?: boolean;
|
|
5
|
+
}
|
|
1
6
|
export interface StartWebRpcAudioStreamOptions {
|
|
7
|
+
readonly audioConstraints?: WebRtcAudioConstraints;
|
|
2
8
|
readonly audioDebugPort?: MessagePort;
|
|
3
9
|
readonly elementLocator: string;
|
|
4
10
|
readonly ephemeralKey: string;
|