trtc-sdk-v5 5.18.2-beta.3 → 5.18.2-beta.5
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 +1 -1
- package/plugins/cdn-streaming/package.json +1 -1
- package/plugins/chorus/package.json +1 -1
- package/plugins/cross-room/package.json +1 -1
- package/plugins/custom-encryption/package.json +1 -1
- package/plugins/device-detector/package.json +1 -1
- package/plugins/interactive-whiteboard/package.json +1 -1
- package/plugins/lebplayer/package.json +1 -1
- package/plugins/realtime-transcriber/package.json +1 -1
- package/plugins/small-stream-auto-switcher/package.json +1 -1
- package/plugins/video-decoder/package.json +1 -1
- package/plugins/video-effect/basic-beauty/package.json +1 -1
- package/plugins/video-effect/beauty/package.json +1 -1
- package/plugins/video-effect/face-detection/package.json +1 -1
- package/plugins/video-effect/video-mixer/package.json +1 -1
- package/plugins/video-effect/virtual-background/package.json +1 -1
- package/plugins/video-effect/watermark/package.json +1 -1
- package/plugins/voice-changer/package.json +1 -1
- package/plugins/whiteboard/package.json +1 -1
- package/plugins/whiteboard/whiteboard.esm.d.ts +16 -46
- package/plugins/whiteboard/whiteboard.esm.js +1 -1
- package/plugins/whiteboard/whiteboard.umd.js +2 -2
- package/trtc.esm.js +2 -2
- package/trtc.js +1 -1
package/package.json
CHANGED
|
@@ -73,32 +73,20 @@ export enum WhiteboardEvent {
|
|
|
73
73
|
STARTED = 'started',
|
|
74
74
|
STOPPED = 'stopped',
|
|
75
75
|
ERROR = 'error',
|
|
76
|
-
/** Host (M1): a remote guest just started a stroke (first DRAW_DELTA). */
|
|
77
|
-
REMOTE_STROKE_STARTED = 'remote-stroke-started',
|
|
78
|
-
/** Host (M1): a stroke just landed on the shared canvas (host or guest origin). */
|
|
79
|
-
REMOTE_STROKE_COMMITTED = 'remote-stroke-committed',
|
|
80
|
-
/** Guest only: emitted when the host heartbeat times out. */
|
|
81
|
-
SESSION_HOST_LOST = 'session-host-lost',
|
|
82
76
|
/** Guest only: emitted when the ACK feedback loop enters `stalled`. */
|
|
83
|
-
|
|
77
|
+
STALLED = 'stalled',
|
|
84
78
|
/** Guest only: emitted when a SESSION_START batch resend exits stalled. */
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
/** Payload carried by `REMOTE_STROKE_STARTED` / `REMOTE_STROKE_COMMITTED`. */
|
|
91
|
-
export interface WhiteboardStrokeInfo {
|
|
92
|
-
/** Owner of the stroke (the host's userId for host-origin strokes). */
|
|
93
|
-
userId: string;
|
|
94
|
-
/** Globally unique stroke id (`${ownerShortId}-${seq}`). */
|
|
95
|
-
strokeId: string;
|
|
79
|
+
RESUMED = 'resumed',
|
|
80
|
+
/** Host + Guest: undo availability changed. */
|
|
81
|
+
UNDO_STATE_CHANGED = 'undo-state-changed',
|
|
82
|
+
/** Host + Guest: redo availability changed. */
|
|
83
|
+
REDO_STATE_CHANGED = 'redo-state-changed',
|
|
96
84
|
}
|
|
97
85
|
|
|
98
86
|
/** Reason why the guest ACK feedback loop entered `stalled`. */
|
|
99
|
-
export type SessionStalledReason = 'silence' | 'queue-full';
|
|
87
|
+
export type SessionStalledReason = 'silence' | 'queue-full' | 'ack-timeout';
|
|
100
88
|
|
|
101
|
-
/** Payload carried by `
|
|
89
|
+
/** Payload carried by `STALLED`. */
|
|
102
90
|
export interface WhiteboardSessionStalledInfo {
|
|
103
91
|
/** Target host userId. */
|
|
104
92
|
targetUser: string;
|
|
@@ -108,7 +96,7 @@ export interface WhiteboardSessionStalledInfo {
|
|
|
108
96
|
reason: SessionStalledReason;
|
|
109
97
|
}
|
|
110
98
|
|
|
111
|
-
/** Payload carried by `
|
|
99
|
+
/** Payload carried by `RESUMED`. */
|
|
112
100
|
export interface WhiteboardSessionResumedInfo {
|
|
113
101
|
/** Target host userId. */
|
|
114
102
|
targetUser: string;
|
|
@@ -116,12 +104,6 @@ export interface WhiteboardSessionResumedInfo {
|
|
|
116
104
|
resentCount: number;
|
|
117
105
|
}
|
|
118
106
|
|
|
119
|
-
/** Payload carried by future planned `ROLE_CHANGED`. */
|
|
120
|
-
export interface WhiteboardRoleInfo {
|
|
121
|
-
role: 'host' | 'guest';
|
|
122
|
-
targetUser: string;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
107
|
/**
|
|
126
108
|
* Whiteboard start options.
|
|
127
109
|
*
|
|
@@ -292,7 +274,7 @@ export default class Whiteboard {
|
|
|
292
274
|
|
|
293
275
|
/**
|
|
294
276
|
* Public event name enum:
|
|
295
|
-
* `Whiteboard.EVENT.STARTED`, `Whiteboard.EVENT.
|
|
277
|
+
* `Whiteboard.EVENT.STARTED`, `Whiteboard.EVENT.STOPPED`, …
|
|
296
278
|
*/
|
|
297
279
|
static EVENT: typeof WhiteboardEvent;
|
|
298
280
|
|
|
@@ -333,29 +315,17 @@ export default class Whiteboard {
|
|
|
333
315
|
on(event: WhiteboardEvent.STOPPED | 'stopped', handler: () => void): this;
|
|
334
316
|
/** Subscribe to `ERROR`. */
|
|
335
317
|
on(event: WhiteboardEvent.ERROR | 'error', handler: (err: Error) => void): this;
|
|
336
|
-
/** Subscribe to `
|
|
337
|
-
on(event: WhiteboardEvent.
|
|
338
|
-
/** Subscribe to `
|
|
339
|
-
on(event: WhiteboardEvent.
|
|
340
|
-
/** Subscribe to `SESSION_HOST_LOST` (guest only). */
|
|
341
|
-
on(event: WhiteboardEvent.SESSION_HOST_LOST | 'session-host-lost', handler: () => void): this;
|
|
342
|
-
/** Subscribe to `SESSION_STALLED` (guest only). */
|
|
343
|
-
on(event: WhiteboardEvent.SESSION_STALLED | 'session-stalled', handler: (info: WhiteboardSessionStalledInfo) => void): this;
|
|
344
|
-
/** Subscribe to `SESSION_RESUMED` (guest only). */
|
|
345
|
-
on(event: WhiteboardEvent.SESSION_RESUMED | 'session-resumed', handler: (info: WhiteboardSessionResumedInfo) => void): this;
|
|
346
|
-
/** Subscribe to `ROLE_CHANGED` (future planned; not emitted in the current version). */
|
|
347
|
-
on(event: WhiteboardEvent.ROLE_CHANGED | 'role-changed', handler: (info: WhiteboardRoleInfo) => void): this;
|
|
318
|
+
/** Subscribe to `STALLED` (guest only). */
|
|
319
|
+
on(event: WhiteboardEvent.STALLED | 'stalled', handler: (info: WhiteboardSessionStalledInfo) => void): this;
|
|
320
|
+
/** Subscribe to `RESUMED` (guest only). */
|
|
321
|
+
on(event: WhiteboardEvent.RESUMED | 'resumed', handler: (info: WhiteboardSessionResumedInfo) => void): this;
|
|
348
322
|
|
|
349
323
|
/** Subscribe-once helpers (same overloads as `on`). */
|
|
350
324
|
once(event: WhiteboardEvent.STARTED | 'started', handler: () => void): this;
|
|
351
325
|
once(event: WhiteboardEvent.STOPPED | 'stopped', handler: () => void): this;
|
|
352
326
|
once(event: WhiteboardEvent.ERROR | 'error', handler: (err: Error) => void): this;
|
|
353
|
-
once(event: WhiteboardEvent.
|
|
354
|
-
once(event: WhiteboardEvent.
|
|
355
|
-
once(event: WhiteboardEvent.SESSION_HOST_LOST | 'session-host-lost', handler: () => void): this;
|
|
356
|
-
once(event: WhiteboardEvent.SESSION_STALLED | 'session-stalled', handler: (info: WhiteboardSessionStalledInfo) => void): this;
|
|
357
|
-
once(event: WhiteboardEvent.SESSION_RESUMED | 'session-resumed', handler: (info: WhiteboardSessionResumedInfo) => void): this;
|
|
358
|
-
once(event: WhiteboardEvent.ROLE_CHANGED | 'role-changed', handler: (info: WhiteboardRoleInfo) => void): this;
|
|
327
|
+
once(event: WhiteboardEvent.STALLED | 'stalled', handler: (info: WhiteboardSessionStalledInfo) => void): this;
|
|
328
|
+
once(event: WhiteboardEvent.RESUMED | 'resumed', handler: (info: WhiteboardSessionResumedInfo) => void): this;
|
|
359
329
|
|
|
360
330
|
/** Unsubscribe a previously registered handler. Pass no `handler` to remove all for the event. */
|
|
361
331
|
off(event: WhiteboardEvent | `${WhiteboardEvent}`, handler?: (...args: any[]) => void): this;
|