@netless/window-manager 0.4.63 → 0.4.65-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "0.4.63",
3
+ "version": "0.4.65-beta.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -53,9 +53,10 @@ export class MainViewProxy {
53
53
  if (isWritable) {
54
54
  this.ensureCameraAndSize();
55
55
  }
56
+ if (this.manager.room) this.syncMainView(this.manager.room);
56
57
  });
57
58
  });
58
- }
59
+ };
59
60
 
60
61
  public ensureCameraAndSize() {
61
62
  if (this.viewMode !== ViewMode.Broadcaster) return;
@@ -87,6 +88,7 @@ export class MainViewProxy {
87
88
  if (this.started) return;
88
89
  this.addCameraListener();
89
90
  this.addCameraReaction();
91
+ if (this.manager.room) this.syncMainView(this.manager.room);
90
92
  this.started = true;
91
93
  }
92
94
 
@@ -123,7 +125,7 @@ export class MainViewProxy {
123
125
  public onUpdateContainerSizeRatio = () => {
124
126
  const size = this.store.getMainViewSize();
125
127
  this.sizeChangeHandler(size);
126
- }
128
+ };
127
129
 
128
130
  public get view(): View {
129
131
  return this.mainView;
@@ -238,7 +240,7 @@ export class MainViewProxy {
238
240
  if (room.isWritable) {
239
241
  room.syncMainView(this.mainView);
240
242
  }
241
- }
243
+ };
242
244
 
243
245
  public moveCameraToContian(size: Size): void {
244
246
  if (!isEmpty(size)) {
@@ -274,9 +276,9 @@ export class MainViewProxy {
274
276
  this.started = false;
275
277
  }
276
278
 
277
- public setViewMode = (mode:ViewMode) => {
279
+ public setViewMode = (mode: ViewMode) => {
278
280
  this.viewMode = mode;
279
- }
281
+ };
280
282
 
281
283
  public destroy() {
282
284
  this.removeMainViewListener();