@netless/window-manager 1.0.13 → 1.0.14
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.js +14 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7095 -7083
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/BuiltinApps.ts +9 -6
package/package.json
CHANGED
package/src/BuiltinApps.ts
CHANGED
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
import AppDocsViewer from "@netless/app-docs-viewer";
|
|
2
|
-
import AppMediaPlayer, { setOptions } from "@netless/app-media-player";
|
|
3
2
|
import { WindowManager } from "./index";
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
const loadAppMediaPlayer = async () => {
|
|
5
|
+
const mod = await import("@netless/app-media-player");
|
|
6
6
|
if (WindowManager.debug) {
|
|
7
|
-
setOptions({ verbose: true });
|
|
7
|
+
mod.setOptions({ verbose: true });
|
|
8
8
|
}
|
|
9
|
+
return (mod.default || mod) as any;
|
|
10
|
+
};
|
|
9
11
|
|
|
12
|
+
export const setupBuiltin = () => {
|
|
10
13
|
WindowManager.register({
|
|
11
14
|
kind: AppDocsViewer.kind,
|
|
12
15
|
src: AppDocsViewer,
|
|
13
16
|
});
|
|
14
17
|
WindowManager.register({
|
|
15
|
-
kind:
|
|
16
|
-
src:
|
|
18
|
+
kind: "MediaPlayer",
|
|
19
|
+
src: loadAppMediaPlayer,
|
|
17
20
|
});
|
|
18
21
|
};
|
|
19
22
|
|
|
20
23
|
export const BuiltinApps = {
|
|
21
24
|
DocsViewer: AppDocsViewer.kind as string,
|
|
22
|
-
MediaPlayer:
|
|
25
|
+
MediaPlayer: "MediaPlayer" as string,
|
|
23
26
|
};
|