@netless/slide 0.8.4 → 0.8.5-beta-1

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/lib/Slide.d.ts CHANGED
@@ -210,6 +210,13 @@ export interface ISlideConfig {
210
210
  width: number;
211
211
  height: number;
212
212
  };
213
+ /**
214
+ * 客户端 id, 在同步及互动场景下, 需要能区分每个不同的客户端。对于收到同步消息的一端来说, 需要用这个
215
+ * clientId 区分是不是自己发出的消息又被自己接收了。
216
+ * 如果同步及互动场景下, 没有给这个值会造成某些情况下的状态不同步,已知的场景有:
217
+ * 1. ppt 某一页有自动动画, 动画过程中进行的下一步动作, 在其他客户端可能表现为下一页(即翻页)
218
+ */
219
+ clientId?: string;
213
220
  }
214
221
  interface MediaState {
215
222
  type: "pause" | "play";
@@ -238,6 +245,7 @@ export interface BasicSyncEvent {
238
245
  slideIndex: number;
239
246
  uuid?: string;
240
247
  incrId?: number;
248
+ clientId?: string;
241
249
  }
242
250
  export interface SyncMediaPlayEvent extends BasicSyncEvent {
243
251
  type: "mediaPlay";