@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Multi-window mode for Netless Whiteboard",
5
5
  "author": "l1shen <lishen1635@gmail.com> (https://github.com/l1shen)",
6
6
  "license": "MIT",
@@ -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
- export const setupBuiltin = () => {
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: AppMediaPlayer.kind,
16
- src: AppMediaPlayer as any,
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: AppMediaPlayer.kind as string,
25
+ MediaPlayer: "MediaPlayer" as string,
23
26
  };