@microsoft/live-share-media 1.0.0-preview.8 → 1.0.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.
Files changed (86) hide show
  1. package/LICENSE +64 -61
  2. package/README.md +11 -15
  3. package/bin/IMediaPlayer.d.ts +20 -20
  4. package/bin/IMediaPlayer.js +6 -6
  5. package/bin/LiveMediaSession.d.ts +90 -94
  6. package/bin/LiveMediaSession.d.ts.map +1 -1
  7. package/bin/LiveMediaSession.js +228 -231
  8. package/bin/LiveMediaSession.js.map +1 -1
  9. package/bin/LiveMediaSessionCoordinator.d.ts +238 -227
  10. package/bin/LiveMediaSessionCoordinator.d.ts.map +1 -1
  11. package/bin/LiveMediaSessionCoordinator.js +476 -407
  12. package/bin/LiveMediaSessionCoordinator.js.map +1 -1
  13. package/bin/LiveMediaSessionCoordinatorSuspension.d.ts +19 -19
  14. package/bin/LiveMediaSessionCoordinatorSuspension.js +27 -27
  15. package/bin/MediaPlayerSynchronizer.d.ts +173 -163
  16. package/bin/MediaPlayerSynchronizer.d.ts.map +1 -1
  17. package/bin/MediaPlayerSynchronizer.js +491 -468
  18. package/bin/MediaPlayerSynchronizer.js.map +1 -1
  19. package/bin/MediaSessionActionThrottler.d.ts +11 -11
  20. package/bin/MediaSessionActionThrottler.js +13 -13
  21. package/bin/MediaSessionExtensions.d.ts +34 -34
  22. package/bin/MediaSessionExtensions.d.ts.map +1 -1
  23. package/bin/MediaSessionExtensions.js +12 -12
  24. package/bin/RepeatedActionThrottler.d.ts +19 -19
  25. package/bin/RepeatedActionThrottler.js +62 -62
  26. package/bin/RepeatedActionThrottler.js.map +1 -1
  27. package/bin/VolumeManager.d.ts +83 -83
  28. package/bin/VolumeManager.js +174 -174
  29. package/bin/index.d.ts +13 -13
  30. package/bin/index.js +29 -29
  31. package/bin/internals/GroupCoordinatorState.d.ts +93 -92
  32. package/bin/internals/GroupCoordinatorState.d.ts.map +1 -1
  33. package/bin/internals/GroupCoordinatorState.js +407 -404
  34. package/bin/internals/GroupCoordinatorState.js.map +1 -1
  35. package/bin/internals/GroupPlaybackPosition.d.ts +67 -66
  36. package/bin/internals/GroupPlaybackPosition.d.ts.map +1 -1
  37. package/bin/internals/GroupPlaybackPosition.js +166 -166
  38. package/bin/internals/GroupPlaybackPosition.js.map +1 -1
  39. package/bin/internals/GroupPlaybackTrack.d.ts +45 -45
  40. package/bin/internals/GroupPlaybackTrack.d.ts.map +1 -1
  41. package/bin/internals/GroupPlaybackTrack.js +121 -121
  42. package/bin/internals/GroupPlaybackTrackData.d.ts +39 -39
  43. package/bin/internals/GroupPlaybackTrackData.d.ts.map +1 -1
  44. package/bin/internals/GroupPlaybackTrackData.js +69 -69
  45. package/bin/internals/GroupTransportState.d.ts +49 -48
  46. package/bin/internals/GroupTransportState.d.ts.map +1 -1
  47. package/bin/internals/GroupTransportState.js +111 -111
  48. package/bin/internals/GroupTransportState.js.map +1 -1
  49. package/bin/internals/consts.d.ts +75 -72
  50. package/bin/internals/consts.d.ts.map +1 -1
  51. package/bin/internals/consts.js +84 -81
  52. package/bin/internals/consts.js.map +1 -1
  53. package/bin/internals/index.d.ts +10 -10
  54. package/bin/internals/index.js +26 -26
  55. package/package.json +9 -7
  56. package/src/LiveMediaSession.ts +24 -20
  57. package/src/LiveMediaSessionCoordinator.ts +101 -29
  58. package/src/MediaPlayerSynchronizer.ts +30 -14
  59. package/src/internals/GroupCoordinatorState.ts +49 -34
  60. package/src/internals/GroupPlaybackPosition.ts +7 -3
  61. package/src/internals/GroupPlaybackTrack.ts +2 -2
  62. package/src/internals/GroupPlaybackTrackData.ts +2 -2
  63. package/src/internals/GroupTransportState.ts +11 -4
  64. package/src/internals/consts.ts +4 -0
  65. package/typedoc.json +10 -0
  66. package/bin/EphemeralMediaSession.d.ts +0 -102
  67. package/bin/EphemeralMediaSession.d.ts.map +0 -1
  68. package/bin/EphemeralMediaSession.js +0 -226
  69. package/bin/EphemeralMediaSession.js.map +0 -1
  70. package/bin/EphemeralMediaSessionCoordinator.d.ts +0 -228
  71. package/bin/EphemeralMediaSessionCoordinator.d.ts.map +0 -1
  72. package/bin/EphemeralMediaSessionCoordinator.js +0 -396
  73. package/bin/EphemeralMediaSessionCoordinator.js.map +0 -1
  74. package/bin/EphemeralMediaSessionCoordinatorSuspension.d.ts +0 -20
  75. package/bin/EphemeralMediaSessionCoordinatorSuspension.d.ts.map +0 -1
  76. package/bin/EphemeralMediaSessionCoordinatorSuspension.js +0 -28
  77. package/bin/EphemeralMediaSessionCoordinatorSuspension.js.map +0 -1
  78. package/bin/VolumeLimiter.d.ts +0 -70
  79. package/bin/VolumeLimiter.d.ts.map +0 -1
  80. package/bin/VolumeLimiter.js +0 -170
  81. package/bin/VolumeLimiter.js.map +0 -1
  82. package/src/test/GroupPlaybackPosition.spec.ts +0 -600
  83. package/src/test/GroupPlaybackTrack.spec.ts +0 -122
  84. package/src/test/SharedMediaSession.spec.ts +0 -149
  85. package/src/test/SharedMediaSessionCoordinator.spec.ts +0 -271
  86. package/src/test/VolumeManager.spec.ts +0 -219
@@ -1,228 +1,239 @@
1
- /**
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the Microsoft Live Share SDK License.
4
- */
5
- /// <reference types="node" />
6
- import { IRuntimeSignaler, UserMeetingRole } from "@microsoft/live-share";
7
- import { CoordinationWaitPoint, ExtendedMediaMetadata, ExtendedMediaSessionPlaybackState, MediaSessionCoordinatorSuspension } from "./MediaSessionExtensions";
8
- import EventEmitter from "events";
9
- /**
10
- * Most recent state of the media session.
11
- */
12
- export interface IMediaPlayerState {
13
- /**
14
- * Metadata for the sessions current track.
15
- */
16
- metadata: ExtendedMediaMetadata | null;
17
- /**
18
- * Optional track data object being synchronized.
19
- *
20
- * @remarks
21
- * This can be used to sync things like pitch, roll, and yaw when watching 360 videos together.
22
- */
23
- trackData: object | null;
24
- /**
25
- * Sessions current playback state.
26
- */
27
- playbackState: ExtendedMediaSessionPlaybackState;
28
- /**
29
- * Sessions current position state if known.
30
- */
31
- positionState?: MediaPositionState;
32
- }
33
- /**
34
- * The `LiveMediaSessionCoordinator` tracks the playback & position state of all other
35
- * clients being synchronized with. It is responsible for keeping the local media player
36
- * in sync with the group.
37
- */
38
- export declare class LiveMediaSessionCoordinator extends EventEmitter {
39
- private readonly _runtime;
40
- private readonly _logger;
41
- private readonly _getPlayerState;
42
- private _positionUpdateInterval;
43
- private _maxPlaybackDrift;
44
- private _lastWaitPoint?;
45
- private _hasInitialized;
46
- private _playEvent?;
47
- private _pauseEvent?;
48
- private _seekToEvent?;
49
- private _setTrackEvent?;
50
- private _setTrackDataEvent?;
51
- private _positionUpdateEvent?;
52
- private _joinedEvent?;
53
- private _groupState?;
54
- /**
55
- * @hidden
56
- * Applications shouldn't directly create new coordinator instances.
57
- */
58
- constructor(runtime: IRuntimeSignaler, getPlayerState: () => IMediaPlayerState);
59
- /**
60
- * Controls whether or not the local client is allowed to instruct the group to play or pause.
61
- *
62
- * @remarks
63
- * This flag largely meant to influence decisions made by the coordinator and can be used by
64
- * the UI to determine what controls should be shown to the user. It does not provide any
65
- * security in itself.
66
- *
67
- * If your app is running in a semi-trusted environment where only some clients are allowed
68
- * to play/pause media, you should use "role based verification" to enforce those policies.
69
- */
70
- canPlayPause: boolean;
71
- /**
72
- * Controls whether or not the local client is allowed to seek the group to a new playback
73
- * position.
74
- *
75
- * @remarks
76
- * This flag largely meant to influence decisions made by the coordinator and can be used by
77
- * the UI to determine what controls should be shown to the user. It does not provide any
78
- * security in itself.
79
- *
80
- * If your app is running in a semi-trusted environment where only some clients are allowed
81
- * to change the playback position, you should use "role based verification" to enforce those policies.
82
- */
83
- canSeek: boolean;
84
- /**
85
- * Controls whether or not the local client is allowed to change tracks.
86
- *
87
- * @remarks
88
- * This flag largely meant to influence decisions made by the coordinator and can be used by
89
- * the UI to determine what controls should be shown to the user. It does not provide any
90
- * security in itself.
91
- *
92
- * If your app is running in a semi-trusted environment where only some clients are allowed
93
- * to change tracks, you should use "role based verification" to enforce those policies.
94
- */
95
- canSetTrack: boolean;
96
- /**
97
- * Controls whether or not the local client is allowed to change the tracks custom data object.
98
- *
99
- * @remarks
100
- * This flag largely meant to influence decisions made by the coordinator and can be used by
101
- * the UI to determine what controls should be shown to the user. It does not provide any
102
- * security in itself.
103
- *
104
- * If your app is running in a semi-trusted environment where only some clients are allowed
105
- * to change the tracks data object, you should use "role based verification" to enforce those
106
- * policies.
107
- */
108
- canSetTrackData: boolean;
109
- /**
110
- * Returns true if the local client is in a suspended state.
111
- */
112
- get isSuspended(): boolean;
113
- /**
114
- * Max amount of playback drift allowed in seconds.
115
- *
116
- * @remarks
117
- * Should the local clients playback position lag by more than the specified value, the
118
- * coordinator will trigger a `catchup` action.
119
- *
120
- * Defaults to a value of `1` second.
121
- */
122
- get maxPlaybackDrift(): number;
123
- set maxPlaybackDrift(value: number);
124
- /**
125
- * Frequency with which position updates are broadcast to the rest of the group in
126
- * seconds.
127
- *
128
- * @remarks
129
- * Defaults to a value of `2` seconds.
130
- */
131
- get positionUpdateInterval(): number;
132
- set positionUpdateInterval(value: number);
133
- /**
134
- * Instructs the group to play the current track.
135
- *
136
- * @remarks
137
- * Throws an exception if the session/coordinator hasn't been initialized, no track has been
138
- * loaded, or `canPlayPause` is false.
139
- */
140
- play(): void;
141
- /**
142
- * Instructs the group to pause the current track.
143
- *
144
- * @remarks
145
- * Throws an exception if the session/coordinator hasn't been initialized, no track has been
146
- * loaded, or `canPlayPause` is false.
147
- */
148
- pause(): void;
149
- /**
150
- * Instructs the group to seek to a new position within the current track.
151
- *
152
- * @remarks
153
- * Throws an exception if the session/coordinator hasn't been initialized, no track has been
154
- * loaded, or `canSeek` is false.
155
- * @param time Playback position in seconds to seek to.
156
- */
157
- seekTo(time: number): void;
158
- /**
159
- * Instructs the group to load a new track.
160
- *
161
- * @remarks
162
- * Throws an exception if the session/coordinator hasn't been initialized or `canSetTrack` is
163
- * false.
164
- * @param metadata The track to load or `null` to indicate that the end of the track is reached.
165
- * @param waitPoints Optional. List of static wait points to configure for the track. Dynamic wait points can be added via the `beginSuspension()` call.
166
- */
167
- setTrack(metadata: ExtendedMediaMetadata | null, waitPoints?: CoordinationWaitPoint[]): void;
168
- /**
169
- * Updates the track data object for the current track.
170
- *
171
- * @remarks
172
- * The track data object can be used by applications to synchronize things like pitch, roll,
173
- * and yaw of a 360 video. This data object will be reset to null anytime the track changes.
174
- *
175
- * Throws an exception if the session/coordinator hasn't been initialized or `canSetTrackData` is
176
- * false.
177
- * @param data New data object to sync with the group. This value will be synchronized using a last writer wins strategy.
178
- */
179
- setTrackData(data: object | null): void;
180
- /**
181
- * Begins a new local suspension.
182
- *
183
- * @remarks
184
- * Suspension temporarily suspend the clients local synchronization with the group. This can
185
- * be useful for displaying ads to users or temporarily disconnecting from the session while
186
- * the user seeks the video using a timeline scrubber.
187
- *
188
- * Multiple simultaneous suspensions are allowed and when the last suspension ends the local
189
- * client will be immediately re-synchronized with the group.
190
- *
191
- * A "Dynamic Wait Point" can be specified when `beginSuspension()` is called and the wait
192
- * point will be broadcast to all other clients in the group. Those clients will then
193
- * automatically enter a suspension state once they reach the positions specified by the
194
- * wait point. Clients that are passed the wait point will immediately suspend.
195
- *
196
- * Any wait point based suspension (dynamic or static) will result in all clients remaining
197
- * in a suspension state until the list client ends their suspension. This behavior can be
198
- * conditionally bypassed by settings the wait points `maxClients` value.
199
- *
200
- * Throws an exception if the session/coordinator hasn't been initialized.
201
- * @param waitPoint Optional. Dynamic wait point to broadcast to all of the clients.
202
- * @returns The suspension object. Call `end()` on the returned suspension to end the suspension.
203
- */
204
- beginSuspension(waitPoint?: CoordinationWaitPoint): MediaSessionCoordinatorSuspension;
205
- /**
206
- * @hidden
207
- * Called by MediaSession to verify the coordinator has been initialized.
208
- */
209
- get isInitialized(): boolean;
210
- /**
211
- * @hidden
212
- * Called by MediaSession to start coordinator.
213
- */
214
- initialize(acceptTransportChangesFrom?: UserMeetingRole[]): Promise<void>;
215
- /**
216
- * @hidden
217
- * Called by the MediaSession to detect if a wait point has been hit.
218
- */
219
- findNextWaitPoint(): CoordinationWaitPoint | null;
220
- /**
221
- * @hidden
222
- * Called by MediaSession to trigger the sending of a position update.
223
- */
224
- sendPositionUpdate(state: IMediaPlayerState): void;
225
- protected createChildren(acceptTransportChangesFrom?: UserMeetingRole[]): Promise<void>;
226
- private getPlayerPosition;
227
- }
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the Microsoft Live Share SDK License.
4
+ */
5
+ /// <reference types="node" />
6
+ import { IRuntimeSignaler, UserMeetingRole, LiveShareRuntime } from "@microsoft/live-share";
7
+ import { CoordinationWaitPoint, ExtendedMediaMetadata, ExtendedMediaSessionPlaybackState, MediaSessionCoordinatorSuspension } from "./MediaSessionExtensions";
8
+ import EventEmitter from "events";
9
+ /**
10
+ * Most recent state of the media session.
11
+ */
12
+ export interface IMediaPlayerState {
13
+ /**
14
+ * Metadata for the sessions current track.
15
+ */
16
+ metadata: ExtendedMediaMetadata | null;
17
+ /**
18
+ * Optional track data object being synchronized.
19
+ *
20
+ * @remarks
21
+ * This can be used to sync things like pitch, roll, and yaw when watching 360 videos together.
22
+ */
23
+ trackData: object | null;
24
+ /**
25
+ * Sessions current playback state.
26
+ */
27
+ playbackState: ExtendedMediaSessionPlaybackState;
28
+ /**
29
+ * Sessions current position state if known.
30
+ */
31
+ positionState?: MediaPositionState;
32
+ }
33
+ /**
34
+ * The `LiveMediaSessionCoordinator` tracks the playback & position state of all other
35
+ * clients being synchronized with. It is responsible for keeping the local media player
36
+ * in sync with the group.
37
+ */
38
+ export declare class LiveMediaSessionCoordinator extends EventEmitter {
39
+ private readonly _runtime;
40
+ private readonly _liveRuntime;
41
+ private readonly _logger;
42
+ private readonly _getPlayerState;
43
+ private _positionUpdateInterval;
44
+ private _maxPlaybackDrift;
45
+ private _lastWaitPoint?;
46
+ private _hasInitialized;
47
+ private _playEvent?;
48
+ private _pauseEvent?;
49
+ private _seekToEvent?;
50
+ private _setTrackEvent?;
51
+ private _setTrackDataEvent?;
52
+ private _positionUpdateEvent?;
53
+ private _joinedEvent?;
54
+ private _groupState?;
55
+ private _allowedRoles?;
56
+ /**
57
+ * @hidden
58
+ * Applications shouldn't directly create new coordinator instances.
59
+ */
60
+ constructor(runtime: IRuntimeSignaler, liveRuntime: LiveShareRuntime, getPlayerState: () => IMediaPlayerState);
61
+ /**
62
+ * Controls whether or not the local client is allowed to instruct the group to play or pause.
63
+ *
64
+ * @remarks
65
+ * This flag largely meant to influence decisions made by the coordinator and can be used by
66
+ * the UI to determine what controls should be shown to the user. It does not provide any
67
+ * security in itself.
68
+ *
69
+ * If your app is running in a semi-trusted environment where only some clients are allowed
70
+ * to play/pause media, you should use "role based verification" to enforce those policies.
71
+ */
72
+ canPlayPause: boolean;
73
+ /**
74
+ * Controls whether or not the local client is allowed to seek the group to a new playback
75
+ * position.
76
+ *
77
+ * @remarks
78
+ * This flag largely meant to influence decisions made by the coordinator and can be used by
79
+ * the UI to determine what controls should be shown to the user. It does not provide any
80
+ * security in itself.
81
+ *
82
+ * If your app is running in a semi-trusted environment where only some clients are allowed
83
+ * to change the playback position, you should use "role based verification" to enforce those policies.
84
+ */
85
+ canSeek: boolean;
86
+ /**
87
+ * Controls whether or not the local client is allowed to change tracks.
88
+ *
89
+ * @remarks
90
+ * This flag largely meant to influence decisions made by the coordinator and can be used by
91
+ * the UI to determine what controls should be shown to the user. It does not provide any
92
+ * security in itself.
93
+ *
94
+ * If your app is running in a semi-trusted environment where only some clients are allowed
95
+ * to change tracks, you should use "role based verification" to enforce those policies.
96
+ */
97
+ canSetTrack: boolean;
98
+ /**
99
+ * Controls whether or not the local client is allowed to change the tracks custom data object.
100
+ *
101
+ * @remarks
102
+ * This flag largely meant to influence decisions made by the coordinator and can be used by
103
+ * the UI to determine what controls should be shown to the user. It does not provide any
104
+ * security in itself.
105
+ *
106
+ * If your app is running in a semi-trusted environment where only some clients are allowed
107
+ * to change the tracks data object, you should use "role based verification" to enforce those
108
+ * policies.
109
+ */
110
+ canSetTrackData: boolean;
111
+ /**
112
+ * Returns true if the local client is in a suspended state.
113
+ */
114
+ get isSuspended(): boolean;
115
+ /**
116
+ * Max amount of playback drift allowed in seconds.
117
+ *
118
+ * @remarks
119
+ * Should the local clients playback position lag by more than the specified value, the
120
+ * coordinator will trigger a `catchup` action.
121
+ *
122
+ * Defaults to a value of `1` second.
123
+ */
124
+ get maxPlaybackDrift(): number;
125
+ set maxPlaybackDrift(value: number);
126
+ /**
127
+ * Frequency with which position updates are broadcast to the rest of the group in
128
+ * seconds.
129
+ *
130
+ * @remarks
131
+ * Defaults to a value of `2` seconds.
132
+ */
133
+ get positionUpdateInterval(): number;
134
+ set positionUpdateInterval(value: number);
135
+ /**
136
+ * Instructs the group to play the current track.
137
+ *
138
+ * @remarks
139
+ * Throws an exception if the session/coordinator hasn't been initialized, no track has been
140
+ * loaded, or `canPlayPause` is false.
141
+ *
142
+ * @returns a void promise that resolves once complete, throws if user does not have proper roles
143
+ */
144
+ play(): Promise<void>;
145
+ /**
146
+ * Instructs the group to pause the current track.
147
+ *
148
+ * @remarks
149
+ * Throws an exception if the session/coordinator hasn't been initialized, no track has been
150
+ * loaded, or `canPlayPause` is false.
151
+ *
152
+ * @returns a void promise that resolves once complete, throws if user does not have proper roles
153
+ */
154
+ pause(): Promise<void>;
155
+ /**
156
+ * Instructs the group to seek to a new position within the current track.
157
+ *
158
+ * @remarks
159
+ * Throws an exception if the session/coordinator hasn't been initialized, no track has been
160
+ * loaded, or `canSeek` is false.
161
+ * @param time Playback position in seconds to seek to.
162
+ * @returns a void promise that resolves once complete, throws if user does not have proper roles
163
+ */
164
+ seekTo(time: number): Promise<void>;
165
+ /**
166
+ * Instructs the group to load a new track.
167
+ *
168
+ * @remarks
169
+ * Throws an exception if the session/coordinator hasn't been initialized or `canSetTrack` is
170
+ * false.
171
+ * @param metadata The track to load or `null` to indicate that the end of the track is reached.
172
+ * @param waitPoints Optional. List of static wait points to configure for the track. Dynamic wait points can be added via the `beginSuspension()` call.
173
+ * @returns a void promise that resolves once complete, throws if user does not have proper roles
174
+ */
175
+ setTrack(metadata: ExtendedMediaMetadata | null, waitPoints?: CoordinationWaitPoint[]): Promise<void>;
176
+ /**
177
+ * Updates the track data object for the current track.
178
+ *
179
+ * @remarks
180
+ * The track data object can be used by applications to synchronize things like pitch, roll,
181
+ * and yaw of a 360 video. This data object will be reset to null anytime the track changes.
182
+ *
183
+ * Throws an exception if the session/coordinator hasn't been initialized or `canSetTrackData` is
184
+ * false.
185
+ * @param data New data object to sync with the group. This value will be synchronized using a last writer wins strategy.
186
+ * @returns a void promise that resolves once complete, throws if user does not have proper roles
187
+ */
188
+ setTrackData(data: object | null): Promise<void>;
189
+ /**
190
+ * Begins a new local suspension.
191
+ *
192
+ * @remarks
193
+ * Suspension temporarily suspend the clients local synchronization with the group. This can
194
+ * be useful for displaying ads to users or temporarily disconnecting from the session while
195
+ * the user seeks the video using a timeline scrubber.
196
+ *
197
+ * Multiple simultaneous suspensions are allowed and when the last suspension ends the local
198
+ * client will be immediately re-synchronized with the group.
199
+ *
200
+ * A "Dynamic Wait Point" can be specified when `beginSuspension()` is called and the wait
201
+ * point will be broadcast to all other clients in the group. Those clients will then
202
+ * automatically enter a suspension state once they reach the positions specified by the
203
+ * wait point. Clients that are passed the wait point will immediately suspend.
204
+ *
205
+ * Any wait point based suspension (dynamic or static) will result in all clients remaining
206
+ * in a suspension state until the list client ends their suspension. This behavior can be
207
+ * conditionally bypassed by settings the wait points `maxClients` value.
208
+ *
209
+ * Throws an exception if the session/coordinator hasn't been initialized.
210
+ * @param waitPoint Optional. Dynamic wait point to broadcast to all of the clients.
211
+ * @returns The suspension object. Call `end()` on the returned suspension to end the suspension.
212
+ */
213
+ beginSuspension(waitPoint?: CoordinationWaitPoint): MediaSessionCoordinatorSuspension;
214
+ /**
215
+ * @hidden
216
+ * Called by MediaSession to verify the coordinator has been initialized.
217
+ */
218
+ get isInitialized(): boolean;
219
+ /**
220
+ * @hidden
221
+ * Called by MediaSession to start coordinator.
222
+ */
223
+ initialize(acceptTransportChangesFrom?: UserMeetingRole[]): Promise<void>;
224
+ /**
225
+ * @hidden
226
+ * Called by the MediaSession to detect if a wait point has been hit.
227
+ */
228
+ findNextWaitPoint(): CoordinationWaitPoint | null;
229
+ /**
230
+ * @hidden
231
+ * Called by MediaSession to trigger the sending of a position update.
232
+ */
233
+ sendPositionUpdate(state: IMediaPlayerState): void;
234
+ protected createChildren(acceptTransportChangesFrom?: UserMeetingRole[]): Promise<void>;
235
+ private getPlayerPosition;
236
+ private verifyLocalUserRoles;
237
+ private waitUntilConnected;
238
+ }
228
239
  //# sourceMappingURL=LiveMediaSessionCoordinator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LiveMediaSessionCoordinator.d.ts","sourceRoot":"","sources":["../src/LiveMediaSessionCoordinator.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAKH,gBAAgB,EAEhB,eAAe,EAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,qBAAqB,EAErB,qBAAqB,EACrB,iCAAiC,EAGjC,iCAAiC,EACpC,MAAM,0BAA0B,CAAC;AAYlC,OAAO,YAAY,MAAM,QAAQ,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;OAEG;IACH,QAAQ,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAEvC;;;;;OAKG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,aAAa,EAAE,iCAAiC,CAAC;IAEjD;;OAEG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;CACtC;AAED;;;;GAIG;AACH,qBAAa,2BAA4B,SAAQ,YAAY;IACzD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmB;IAC5C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAC9C,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA0B;IAC1D,OA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