1
1
import "video.js/dist/video-js.css" ;
2
-
2
+ import "@netless/window-manager/dist/style.css" ;
3
3
import CombinePlayerFactory , { CombinePlayer , PublicCombinedStatus } from "@netless/combine-player" ;
4
- import { CursorTool } from "@netless/cursor-tool" ;
5
4
import {
6
5
PluginId as VideoJsPluginId ,
7
6
videoJsPlugin ,
@@ -19,6 +18,7 @@ import {
19
18
} from "white-web-sdk" ;
20
19
import { Region } from "flat-components" ;
21
20
import { NETLESS , NODE_ENV } from "../constants/process" ;
21
+ import { WindowManager } from "@netless/window-manager" ;
22
22
23
23
export enum SmartPlayerEventType {
24
24
Ready = "Ready" ,
@@ -99,6 +99,7 @@ export class SmartPlayer extends EventEmitter<SmartPlayerEventType> {
99
99
appIdentifier : NETLESS . APP_IDENTIFIER ,
100
100
plugins : plugins ,
101
101
region,
102
+ useMobXState : true ,
102
103
} ) ;
103
104
104
105
this . whiteWebSdk = whiteWebSdk ;
@@ -123,13 +124,12 @@ export class SmartPlayer extends EventEmitter<SmartPlayerEventType> {
123
124
}
124
125
} ) ;
125
126
126
- const cursorAdapter = new CursorTool ( ) ;
127
-
128
127
const replayRoomParams : ReplayRoomParams = {
129
128
room : whiteboardUUID ,
130
129
roomToken : whiteboardRoomToken ,
131
- cursorAdapter : cursorAdapter ,
132
130
region,
131
+ invisiblePlugins : [ WindowManager ] ,
132
+ useMultiViews : true ,
133
133
} ;
134
134
135
135
if ( recording ) {
@@ -138,9 +138,6 @@ export class SmartPlayer extends EventEmitter<SmartPlayerEventType> {
138
138
}
139
139
140
140
const player = await whiteWebSdk . replayRoom ( replayRoomParams , {
141
- onLoadFirstFrame : ( ) => {
142
- cursorAdapter . setPlayer ( player ) ;
143
- } ,
144
141
onPhaseChanged : phase => {
145
142
if ( this . combinePlayer ) {
146
143
return ;
@@ -183,9 +180,12 @@ export class SmartPlayer extends EventEmitter<SmartPlayerEventType> {
183
180
} ,
184
181
} ) ;
185
182
186
- cursorAdapter . setPlayer ( player ) ;
187
-
188
- player . bindHtmlElement ( whiteboardEl ) ;
183
+ void WindowManager . mount ( {
184
+ room : player as any ,
185
+ container : whiteboardEl ,
186
+ cursor : true ,
187
+ chessboard : false ,
188
+ } ) ;
189
189
190
190
this . whiteboardPlayer = player ;
191
191
0 commit comments