@netless/app-slide 0.2.48 → 0.2.49
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 +16 -0
- package/dist/main.cjs.js +106 -106
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +516 -490
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +174 -174
- package/dist/main.iife.js.map +1 -1
- package/package.json +2 -2
- package/src/SlideController/index.ts +7 -3
- package/src/utils/tracker.ts +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netless/app-slide",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.49",
|
|
4
4
|
"main": "dist/main.cjs.js",
|
|
5
5
|
"module": "dist/main.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"README-zh.md"
|
|
11
11
|
],
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@netless/slide": "^1.
|
|
13
|
+
"@netless/slide": "^1.2.0",
|
|
14
14
|
"@types/color-string": "^1.5.2",
|
|
15
15
|
"color-string": "^1.9.1",
|
|
16
16
|
"jspdf": "2.5.1",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// 5. pages information are loaded dynamically by the slide package
|
|
10
10
|
|
|
11
11
|
import type { AppContext, Player, Room, Displayer } from "@netless/window-manager";
|
|
12
|
-
import type { SyncEvent } from "@netless/slide";
|
|
12
|
+
import type { ISlideConfig, SyncEvent } from "@netless/slide";
|
|
13
13
|
import type { Attributes, MagixEvents, MagixPayload, SlideState } from "../typings";
|
|
14
14
|
import type { AppOptions } from "..";
|
|
15
15
|
|
|
@@ -18,6 +18,7 @@ import { Slide, SLIDE_EVENTS } from "@netless/slide";
|
|
|
18
18
|
import { clamp } from "../utils/helpers";
|
|
19
19
|
import { cachedGetBgColor } from "../utils/bgcolor";
|
|
20
20
|
import { logger, log, verbose, setRoomLogger } from "../utils/logger";
|
|
21
|
+
import { getRoomTracker } from "../utils/tracker";
|
|
21
22
|
export { syncSceneWithSlide, createDocsViewerPages } from "./helpers";
|
|
22
23
|
|
|
23
24
|
export const DefaultUrl = "https://convertcdn.netless.link/dynamicConvert";
|
|
@@ -89,7 +90,9 @@ export class SlideController {
|
|
|
89
90
|
this.room = context.getRoom();
|
|
90
91
|
this.player = this.room ? undefined : (context.getDisplayer() as Player);
|
|
91
92
|
setRoomLogger((this.room || this.player) as Displayer);
|
|
92
|
-
this.slide = this.createSlide(anchor
|
|
93
|
+
this.slide = this.createSlide(anchor, {
|
|
94
|
+
whiteTracker: getRoomTracker(context.getDisplayer()),
|
|
95
|
+
});
|
|
93
96
|
|
|
94
97
|
// the adder does not need to sync state
|
|
95
98
|
this.syncStateOnceFlag = !this.context.isAddApp;
|
|
@@ -259,7 +262,7 @@ export class SlideController {
|
|
|
259
262
|
return this.slide.slideState.currentSlideIndex;
|
|
260
263
|
}
|
|
261
264
|
|
|
262
|
-
private createSlide(anchor: HTMLDivElement) {
|
|
265
|
+
private createSlide(anchor: HTMLDivElement, defaults: Partial<ISlideConfig> = {}) {
|
|
263
266
|
const options = this.context.getAppOptions() || {};
|
|
264
267
|
const slide = new Slide({
|
|
265
268
|
anchor,
|
|
@@ -286,6 +289,7 @@ export class SlideController {
|
|
|
286
289
|
rtcAudio: options.rtcAudio,
|
|
287
290
|
useLocalCache: options.useLocalCache,
|
|
288
291
|
logger: options.logger,
|
|
292
|
+
whiteTracker: defaults.whiteTracker,
|
|
289
293
|
timestamp: this.timestamp,
|
|
290
294
|
});
|
|
291
295
|
if (import.meta.env.DEV) {
|