@microsoft/live-share-media 1.0.0-preview.4 → 1.0.0-preview.6

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.
@@ -0,0 +1,396 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the Microsoft Live Share SDK License.
5
+ */
6
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
7
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8
+ return new (P || (P = Promise))(function (resolve, reject) {
9
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
10
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
11
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
12
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
13
+ });
14
+ };
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.EphemeralMediaSessionCoordinator = void 0;
20
+ const live_share_1 = require("@microsoft/live-share");
21
+ const internals_1 = require("./internals");
22
+ const EphemeralMediaSessionCoordinatorSuspension_1 = require("./EphemeralMediaSessionCoordinatorSuspension");
23
+ const events_1 = __importDefault(require("events"));
24
+ /**
25
+ * The `EphemeralMediaSessionCoordinator` tracks the playback & position state of all other
26
+ * clients being synchronized with. It is responsible for keeping the local media player
27
+ * in sync with the group.
28
+ */
29
+ class EphemeralMediaSessionCoordinator extends events_1.default {
30
+ /**
31
+ * @hidden
32
+ * Applications shouldn't directly create new coordinator instances.
33
+ */
34
+ constructor(runtime, getPlayerState) {
35
+ super();
36
+ this._positionUpdateInterval = new live_share_1.TimeInterval(2000);
37
+ this._maxPlaybackDrift = new live_share_1.TimeInterval(1000);
38
+ this._hasInitialized = false;
39
+ /**
40
+ * Controls whether or not the local client is allowed to instruct the group to play or pause.
41
+ *
42
+ * @remarks
43
+ * This flag largely meant to influence decisions made by the coordinator and can be used by
44
+ * the UI to determine what controls should be shown to the user. It does not provide any
45
+ * security in itself.
46
+ *
47
+ * If your app is running in a semi-trusted environment where only some clients are allowed
48
+ * to play/pause media, you should use "role based verification" to enforce those policies.
49
+ */
50
+ this.canPlayPause = true;
51
+ /**
52
+ * Controls whether or not the local client is allowed to seek the group to a new playback
53
+ * position.
54
+ *
55
+ * @remarks
56
+ * This flag largely meant to influence decisions made by the coordinator and can be used by
57
+ * the UI to determine what controls should be shown to the user. It does not provide any
58
+ * security in itself.
59
+ *
60
+ * If your app is running in a semi-trusted environment where only some clients are allowed
61
+ * to change the playback position, you should use "role based verification" to enforce those policies.
62
+ */
63
+ this.canSeek = true;
64
+ /**
65
+ * Controls whether or not the local client is allowed to change tracks.
66
+ *
67
+ * @remarks
68
+ * This flag largely meant to influence decisions made by the coordinator and can be used by
69
+ * the UI to determine what controls should be shown to the user. It does not provide any
70
+ * security in itself.
71
+ *
72
+ * If your app is running in a semi-trusted environment where only some clients are allowed
73
+ * to change tracks, you should use "role based verification" to enforce those policies.
74
+ */
75
+ this.canSetTrack = true;
76
+ /**
77
+ * Controls whether or not the local client is allowed to change the tracks custom data object.
78
+ *
79
+ * @remarks
80
+ * This flag largely meant to influence decisions made by the coordinator and can be used by
81
+ * the UI to determine what controls should be shown to the user. It does not provide any
82
+ * security in itself.
83
+ *
84
+ * If your app is running in a semi-trusted environment where only some clients are allowed
85
+ * to change the tracks data object, you should use "role based verification" to enforce those
86
+ * policies.
87
+ */
88
+ this.canSetTrackData = true;
89
+ this._runtime = runtime;
90
+ this._logger = new live_share_1.EphemeralTelemetryLogger(runtime);
91
+ this._getPlayerState = getPlayerState;
92
+ }
93
+ /**
94
+ * Returns true if the local client is in a suspended state.
95
+ */
96
+ get isSuspended() {
97
+ return this._groupState ? this._groupState.isSuspended : false;
98
+ }
99
+ /**
100
+ * Max amount of playback drift allowed in seconds.
101
+ *
102
+ * @remarks
103
+ * Should the local clients playback position lag by more than the specified value, the
104
+ * coordinator will trigger a `catchup` action.
105
+ *
106
+ * Defaults to a value of `1` second.
107
+ */
108
+ get maxPlaybackDrift() {
109
+ return this._maxPlaybackDrift.seconds;
110
+ }
111
+ set maxPlaybackDrift(value) {
112
+ this._maxPlaybackDrift.seconds = value;
113
+ }
114
+ /**
115
+ * Frequency with which position updates are broadcast to the rest of the group in
116
+ * seconds.
117
+ *
118
+ * @remarks
119
+ * Defaults to a value of `2` seconds.
120
+ */
121
+ get positionUpdateInterval() {
122
+ return this._positionUpdateInterval.seconds;
123
+ }
124
+ set positionUpdateInterval(value) {
125
+ this._positionUpdateInterval.seconds = value;
126
+ }
127
+ /**
128
+ * Instructs the group to play the current track.
129
+ *
130
+ * @remarks
131
+ * Throws an exception if the session/coordinator hasn't been initialized, no track has been
132
+ * loaded, or `canPlayPause` is false.
133
+ */
134
+ play() {
135
+ var _a;
136
+ if (!this._hasInitialized) {
137
+ throw new Error(`EphemeralMediaSessionCoordinator.play() called before initialize() called.`);
138
+ }
139
+ if (!((_a = this._groupState) === null || _a === void 0 ? void 0 : _a.playbackTrack.current.metadata)) {
140
+ throw new Error(`EphemeralMediaSessionCoordinator.play() called before MediaSession.metadata assigned.`);
141
+ }
142
+ if (!this.canPlayPause) {
143
+ throw new Error(`EphemeralMediaSessionCoordinator.play() operation blocked.`);
144
+ }
145
+ // Get projected position
146
+ const position = this.getPlayerPosition();
147
+ // Send transport command
148
+ this._logger.sendTelemetryEvent(internals_1.TelemetryEvents.SessionCoordinator.PlayCalled, null, { position: position });
149
+ this._playEvent.sendEvent({
150
+ track: this._groupState.playbackTrack.current,
151
+ position: position
152
+ });
153
+ }
154
+ /**
155
+ * Instructs the group to pause the current track.
156
+ *
157
+ * @remarks
158
+ * Throws an exception if the session/coordinator hasn't been initialized, no track has been
159
+ * loaded, or `canPlayPause` is false.
160
+ */
161
+ pause() {
162
+ var _a;
163
+ if (!this._hasInitialized) {
164
+ throw new Error(`EphemeralMediaSessionCoordinator.pause() called before initialize() called.`);
165
+ }
166
+ if (!((_a = this._groupState) === null || _a === void 0 ? void 0 : _a.playbackTrack.current.metadata)) {
167
+ throw new Error(`EphemeralMediaSessionCoordinator.pause() called before MediaSession.metadata assigned.`);
168
+ }
169
+ if (!this.canPlayPause) {
170
+ throw new Error(`EphemeralMediaSessionCoordinator.pause() operation blocked.`);
171
+ }
172
+ // Get projected position
173
+ const position = this.getPlayerPosition();
174
+ // Send transport command
175
+ this._logger.sendTelemetryEvent(internals_1.TelemetryEvents.SessionCoordinator.PauseCalled, null, { position: position });
176
+ this._pauseEvent.sendEvent({
177
+ track: this._groupState.playbackTrack.current,
178
+ position: position
179
+ });
180
+ }
181
+ /**
182
+ * Instructs the group to seek to a new position within the current track.
183
+ *
184
+ * @remarks
185
+ * Throws an exception if the session/coordinator hasn't been initialized, no track has been
186
+ * loaded, or `canSeek` is false.
187
+ * @param time Playback position in seconds to seek to.
188
+ */
189
+ seekTo(time) {
190
+ var _a;
191
+ if (!this._hasInitialized) {
192
+ throw new Error(`EphemeralMediaSessionCoordinator.seekTo() called before initialize() called.`);
193
+ }
194
+ if (!((_a = this._groupState) === null || _a === void 0 ? void 0 : _a.playbackTrack.current.metadata)) {
195
+ throw new Error(`EphemeralMediaSessionCoordinator.seekTo() called before MediaSession.metadata assigned.`);
196
+ }
197
+ if (!this.canSeek) {
198
+ throw new Error(`EphemeralMediaSessionCoordinator.seekTo() operation blocked.`);
199
+ }
200
+ // Send transport command
201
+ this._logger.sendTelemetryEvent(internals_1.TelemetryEvents.SessionCoordinator.SeekToCalled, null, { position: time });
202
+ this._seekToEvent.sendEvent({
203
+ track: this._groupState.playbackTrack.current,
204
+ position: time
205
+ });
206
+ }
207
+ /**
208
+ * Instructs the group to load a new track.
209
+ *
210
+ * @remarks
211
+ * Throws an exception if the session/coordinator hasn't been initialized or `canSetTrack` is
212
+ * false.
213
+ * @param metadata The track to load or `null` to indicate that the end of the track is reached.
214
+ * @param waitPoints Optional. List of static wait points to configure for the track. Dynamic wait points can be added via the `beginSuspension()` call.
215
+ */
216
+ setTrack(metadata, waitPoints) {
217
+ if (!this._hasInitialized) {
218
+ throw new Error(`EphemeralMediaSessionCoordinator.setTrack() called before initialize() called.`);
219
+ }
220
+ if (!this.canSetTrack) {
221
+ throw new Error(`EphemeralMediaSessionCoordinator.setTrack() operation blocked.`);
222
+ }
223
+ // Send transport command
224
+ this._logger.sendTelemetryEvent(internals_1.TelemetryEvents.SessionCoordinator.SetTrackCalled);
225
+ this._setTrackEvent.sendEvent({
226
+ metadata: metadata,
227
+ waitPoints: waitPoints || []
228
+ });
229
+ }
230
+ /**
231
+ * Updates the track data object for the current track.
232
+ *
233
+ * @remarks
234
+ * The track data object can be used by applications to synchronize things like pitch, roll,
235
+ * and yaw of a 360 video. This data object will be reset to null anytime the track changes.
236
+ *
237
+ * Throws an exception if the session/coordinator hasn't been initialized or `canSetTrackData` is
238
+ * false.
239
+ * @param data New data object to sync with the group. This value will be synchronized using a last writer wins strategy.
240
+ */
241
+ setTrackData(data) {
242
+ if (!this._hasInitialized) {
243
+ throw new Error(`EphemeralMediaSessionCoordinator.setTrackData() called before initialize() called.`);
244
+ }
245
+ if (!this.canSetTrackData) {
246
+ throw new Error(`EphemeralMediaSessionCoordinator.setTrackData() operation blocked.`);
247
+ }
248
+ // Send transport command
249
+ this._logger.sendTelemetryEvent(internals_1.TelemetryEvents.SessionCoordinator.SetTrackDataCalled);
250
+ this._setTrackDataEvent.sendEvent({
251
+ data: data
252
+ });
253
+ }
254
+ /**
255
+ * Begins a new local suspension.
256
+ *
257
+ * @remarks
258
+ * Suspension temporarily suspend the clients local synchronization with the group. This can
259
+ * be useful for displaying ads to users or temporarily disconnecting from the session while
260
+ * the user seeks the video using a timeline scrubber.
261
+ *
262
+ * Multiple simultaneous suspensions are allowed and when the last suspension ends the local
263
+ * client will be immediately re-synchronized with the group.
264
+ *
265
+ * A "Dynamic Wait Point" can be specified when `beginSuspension()` is called and the wait
266
+ * point will be broadcast to all other clients in the group. Those clients will then
267
+ * automatically enter a suspension state once they reach the positions specified by the
268
+ * wait point. Clients that are passed the wait point will immediately suspend.
269
+ *
270
+ * Any wait point based suspension (dynamic or static) will result in all clients remaining
271
+ * in a suspension state until the list client ends their suspension. This behavior can be
272
+ * conditionally bypassed by settings the wait points `maxClients` value.
273
+ *
274
+ * Throws an exception if the session/coordinator hasn't been initialized.
275
+ * @param waitPoint Optional. Dynamic wait point to broadcast to all of the clients.
276
+ * @returns The suspension object. Call `end()` on the returned suspension to end the suspension.
277
+ */
278
+ beginSuspension(waitPoint) {
279
+ var _a;
280
+ if (!this._hasInitialized) {
281
+ throw new Error(`EphemeralMediaSessionCoordinator.beginSuspension() called before initialize() called.`);
282
+ }
283
+ if (!((_a = this._groupState) === null || _a === void 0 ? void 0 : _a.playbackTrack.current.metadata)) {
284
+ throw new Error(`EphemeralMediaSessionCoordinator.beginSuspension() called before MediaSession.metadata assigned.`);
285
+ }
286
+ // Tell group state that suspension is started
287
+ if (waitPoint) {
288
+ this._logger.sendTelemetryEvent(internals_1.TelemetryEvents.SessionCoordinator.BeginSuspensionAndWait, null, { position: waitPoint.position, maxClients: waitPoint.maxClients });
289
+ this._lastWaitPoint = waitPoint;
290
+ this._groupState.beginSuspension(waitPoint);
291
+ }
292
+ else {
293
+ this._logger.sendTelemetryEvent(internals_1.TelemetryEvents.SessionCoordinator.BeginSuspension);
294
+ this._groupState.beginSuspension();
295
+ }
296
+ // Return new suspension object
297
+ return new EphemeralMediaSessionCoordinatorSuspension_1.EphemeralMediaSessionCoordinatorSuspension(waitPoint, time => {
298
+ var _a, _b;
299
+ if (waitPoint) {
300
+ this._logger.sendTelemetryEvent(internals_1.TelemetryEvents.SessionCoordinator.EndSuspensionAndWait, null, { position: waitPoint.position, maxClients: waitPoint.maxClients });
301
+ }
302
+ else {
303
+ this._logger.sendTelemetryEvent(internals_1.TelemetryEvents.SessionCoordinator.EndSuspension);
304
+ }
305
+ this._groupState.endSuspension(time == undefined);
306
+ if (time != undefined && !((_a = this._groupState) === null || _a === void 0 ? void 0 : _a.isSuspended) && !((_b = this._groupState) === null || _b === void 0 ? void 0 : _b.isWaiting)) {
307
+ // Seek to new position
308
+ this.seekTo(Math.max(time, 0.0));
309
+ }
310
+ });
311
+ }
312
+ /**
313
+ * @hidden
314
+ * Called by MediaSession to verify the coordinator has been initialized.
315
+ */
316
+ get isInitialized() {
317
+ return this._hasInitialized;
318
+ }
319
+ /**
320
+ * @hidden
321
+ * Called by MediaSession to start coordinator.
322
+ */
323
+ initialize(acceptTransportChangesFrom) {
324
+ return __awaiter(this, void 0, void 0, function* () {
325
+ if (this._hasInitialized) {
326
+ throw new Error(`EphemeralMediaSessionCoordinator.initialize() already initialized.`);
327
+ }
328
+ // Create children
329
+ yield this.createChildren(acceptTransportChangesFrom);
330
+ this._hasInitialized = true;
331
+ });
332
+ }
333
+ /**
334
+ * @hidden
335
+ * Called by the MediaSession to detect if a wait point has been hit.
336
+ */
337
+ findNextWaitPoint() {
338
+ var _a;
339
+ return ((_a = this._groupState) === null || _a === void 0 ? void 0 : _a.playbackTrack.findNextWaitPoint(this._lastWaitPoint)) || null;
340
+ }
341
+ /**
342
+ * @hidden
343
+ * Called by MediaSession to trigger the sending of a position update.
344
+ */
345
+ sendPositionUpdate(state) {
346
+ var _a;
347
+ if (!this._hasInitialized) {
348
+ throw new Error(`EphemeralMediaSessionCoordinator.sendPositionUpdate() called before initialize() called.`);
349
+ }
350
+ // Send position update event
351
+ const evt = this._groupState.createPositionUpdateEvent(state);
352
+ (_a = this._positionUpdateEvent) === null || _a === void 0 ? void 0 : _a.sendEvent(evt);
353
+ }
354
+ createChildren(acceptTransportChangesFrom) {
355
+ return __awaiter(this, void 0, void 0, function* () {
356
+ // Create event scopes
357
+ const scope = new live_share_1.EphemeralEventScope(this._runtime, acceptTransportChangesFrom);
358
+ const unrestrictedScope = new live_share_1.EphemeralEventScope(this._runtime);
359
+ // Initialize internal coordinator state
360
+ this._groupState = new internals_1.GroupCoordinatorState(this._runtime, this._maxPlaybackDrift, this._positionUpdateInterval, this._getPlayerState);
361
+ this._groupState.on(internals_1.GroupCoordinatorStateEvents.triggeraction, evt => this.emit(evt.name, evt));
362
+ // Listen for track changes
363
+ this._setTrackEvent = new live_share_1.EphemeralEventTarget(scope, 'setTrack', (event, local) => this._groupState.handleSetTrack(event, local));
364
+ this._setTrackDataEvent = new live_share_1.EphemeralEventTarget(scope, 'setTrackData', (event, local) => this._groupState.handleSetTrackData(event, local));
365
+ // Listen for transport commands
366
+ this._playEvent = new live_share_1.EphemeralEventTarget(scope, 'play', (event, local) => this._groupState.handleTransportCommand(event, local));
367
+ this._pauseEvent = new live_share_1.EphemeralEventTarget(scope, 'pause', (event, local) => this._groupState.handleTransportCommand(event, local));
368
+ this._seekToEvent = new live_share_1.EphemeralEventTarget(scope, 'seekTo', (event, local) => this._groupState.handleTransportCommand(event, local));
369
+ // Listen for position updates
370
+ this._positionUpdateEvent = new live_share_1.EphemeralEventTarget(unrestrictedScope, 'positionUpdate', (event, local) => this._groupState.handlePositionUpdate(event, local));
371
+ // Listen for joined event
372
+ this._joinedEvent = new live_share_1.EphemeralEventTarget(unrestrictedScope, 'joined', (evt, local) => {
373
+ var _a;
374
+ // Immediately send a position update
375
+ this._logger.sendTelemetryEvent(internals_1.TelemetryEvents.SessionCoordinator.RemoteJoinReceived, null, { correlationId: live_share_1.EphemeralTelemetryLogger.formatCorrelationId(evt.clientId, evt.timestamp) });
376
+ const state = this._getPlayerState();
377
+ const update = this._groupState.createPositionUpdateEvent(state);
378
+ (_a = this._positionUpdateEvent) === null || _a === void 0 ? void 0 : _a.sendEvent(update);
379
+ });
380
+ // Send initial joined event
381
+ this._joinedEvent.sendEvent({});
382
+ });
383
+ }
384
+ getPlayerPosition() {
385
+ const { positionState, playbackState } = this._getPlayerState();
386
+ switch (playbackState) {
387
+ case 'none':
388
+ case 'ended':
389
+ return 0.0;
390
+ default:
391
+ return positionState && positionState.position != undefined ? positionState.position : 0.0;
392
+ }
393
+ }
394
+ }
395
+ exports.EphemeralMediaSessionCoordinator = EphemeralMediaSessionCoordinator;
396
+ //# sourceMappingURL=EphemeralMediaSessionCoordinator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EphemeralMediaSessionCoordinator.js","sourceRoot":"","sources":["../src/EphemeralMediaSessionCoordinator.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;AAEH,sDAA8K;AAE9K,2CAAyM;AACzM,6GAA0G;AAC1G,oDAAkC;AA8BlC;;;;GAIG;AACH,MAAa,gCAAiC,SAAQ,gBAAY;IAqB9D;;;OAGG;IACH,YAAY,OAAyB,EAAE,cAAuC;QAC1E,KAAK,EAAE,CAAC;QAtBJ,4BAAuB,GAAG,IAAI,yBAAY,CAAC,IAAI,CAAC,CAAC;QACjD,sBAAiB,GAAG,IAAI,yBAAY,CAAC,IAAI,CAAC,CAAC;QAE3C,oBAAe,GAAG,KAAK,CAAC;QA0BhC;;;;;;;;;;WAUG;QACI,iBAAY,GAAY,IAAI,CAAC;QAEpC;;;;;;;;;;;WAWG;QACI,YAAO,GAAY,IAAI,CAAC;QAE/B;;;;;;;;;;WAUG;QACI,gBAAW,GAAY,IAAI,CAAC;QAEnC;;;;;;;;;;;WAWG;QACI,oBAAe,GAAY,IAAI,CAAC;QA1DnC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,IAAI,qCAAwB,CAAC,OAAO,CAAC,CAAC;QACrD,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;IAC1C,CAAC;IAyDD;;OAEG;IACH,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC;IACnE,CAAC;IAED;;;;;;;;OAQG;IACH,IAAW,gBAAgB;QACvB,OAAO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CAAC,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC;SAClG;IACL,CAAC;CACJ;AAhaD,4EAgaC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the Microsoft Live Share SDK License.
4
+ */
5
+ import { MediaSessionCoordinatorSuspension, CoordinationWaitPoint } from './MediaSessionExtensions';
6
+ export declare class EphemeralMediaSessionCoordinatorSuspension implements MediaSessionCoordinatorSuspension {
7
+ private _waitPoint?;
8
+ private _onEnd;
9
+ constructor(waitPoint: CoordinationWaitPoint | undefined, onEnd: (seekTo?: number) => void);
10
+ /**
11
+ * Returns an optional wait point associated with the suspension.
12
+ */
13
+ get waitPoint(): CoordinationWaitPoint | undefined;
14
+ /**
15
+ * Ends the suspension and optionally proposes a time to seek to.
16
+ * @param seekTo Optional. Proposed time to seek to. Ignored for suspensions at wait points.
17
+ */
18
+ end(seekTo?: number): void;
19
+ }
20
+ //# sourceMappingURL=EphemeralMediaSessionCoordinatorSuspension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EphemeralMediaSessionCoordinatorSuspension.d.ts","sourceRoot":"","sources":["../src/EphemeralMediaSessionCoordinatorSuspension.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,iCAAiC,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEpG,qBAAa,0CAA2C,YAAW,iCAAiC;IAChG,OAAO,CAAC,UAAU,CAAC,CAAwB;IAC3C,OAAO,CAAC,MAAM,CAA4B;gBAE9B,SAAS,EAAE,qBAAqB,GAAC,SAAS,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,IAAI;IAKxF;;OAEG;IACH,IAAW,SAAS,IAAI,qBAAqB,GAAC,SAAS,CAEtD;IAED;;;OAGG;IACI,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;CAGpC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the Microsoft Live Share SDK License.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.EphemeralMediaSessionCoordinatorSuspension = void 0;
8
+ class EphemeralMediaSessionCoordinatorSuspension {
9
+ constructor(waitPoint, onEnd) {
10
+ this._waitPoint = waitPoint;
11
+ this._onEnd = onEnd;
12
+ }
13
+ /**
14
+ * Returns an optional wait point associated with the suspension.
15
+ */
16
+ get waitPoint() {
17
+ return this._waitPoint;
18
+ }
19
+ /**
20
+ * Ends the suspension and optionally proposes a time to seek to.
21
+ * @param seekTo Optional. Proposed time to seek to. Ignored for suspensions at wait points.
22
+ */
23
+ end(seekTo) {
24
+ this._onEnd(seekTo);
25
+ }
26
+ }
27
+ exports.EphemeralMediaSessionCoordinatorSuspension = EphemeralMediaSessionCoordinatorSuspension;
28
+ //# sourceMappingURL=EphemeralMediaSessionCoordinatorSuspension.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EphemeralMediaSessionCoordinatorSuspension.js","sourceRoot":"","sources":["../src/EphemeralMediaSessionCoordinatorSuspension.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,MAAa,0CAA0C;IAInD,YAAY,SAA0C,EAAE,KAAgC;QACpF,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACI,GAAG,CAAC,MAAe;QACtB,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC;CACJ;AAvBD,gGAuBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LiveMediaSession.d.ts","sourceRoot":"","sources":["../src/LiveMediaSession.ts"],"names":[],"mappings":"AAA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,CAAa;IAEpC;;OAEG;IACH,gBAAuB,QAAQ,+CAA+C;IAE9E;;OAEG;IACH,gBAAuB,OAAO,0FAK5B;IAEF;;;;;;;;;;;;OAYG;IACH,IAAW,eAAe,IAAI,2BAA2B,CAExD;IAED,IAAW,eAAe,CAAC,KAAK,EAAE,2BAA2B,EAE5D;IAED;;OAEG;IACH,IAAW,aAAa,IAAI,OAAO,CAElC;IAED;;;OAGG;IACH,IAAW,SAAS,IAAI,OAAO,CAE9B;IAED;;OAEG;IACH,IAAW,WAAW,IAAI,2BAA2B,CAEpD;IAED;;;;;OAKG;IACH,IAAW,MAAM,IAAI,mBAAmB,CAEvC;IAED;;;;OAIG;IACI,UAAU,CACb,0BAA0B,CAAC,EAAE,eAAe,EAAE,GAC/C,OAAO,CAAC,IAAI,CAAC;IAIhB;;;;OAIG;IACI,gBAAgB,CACnB,MAAM,EAAE,0BAA0B,EAClC,OAAO,EAAE,yBAAyB,GAAG,IAAI,GAC1C,IAAI;IAUP;;;OAGG;IACI,4BAA4B,CAAC,OAAO,EAAE,MAAM,iBAAiB;IAIpE;;;;OAIG;IACI,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,uBAAuB;cAoCjD,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAyE/C,OAAO,CAAC,iBAAiB;IAuBzB,OAAO,CAAC,qBAAqB;IAU7B,OAAO,CAAC,cAAc;CAQzB"}
@@ -225,4 +225,8 @@ LiveMediaSession.TypeName = `@microsoft/fluid-media:SharedMediaSession`;
225
225
  * The objects fluid type factory.
226
226
  */
227
227
  LiveMediaSession.factory = new aqueduct_1.DataObjectFactory(LiveMediaSession.TypeName, LiveMediaSession, [], {});
228
+ /**
229
+ * Register `LiveMediaSession` as an available `LoadableObjectClass` for use in packages that support dynamic object loading, such as `@microsoft/live-share-turbo`.
230
+ */
231
+ live_share_1.DynamicObjectRegistry.registerObjectClass(LiveMediaSession, LiveMediaSession.TypeName);
228
232
  //# sourceMappingURL=LiveMediaSession.js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2C,CAAC;AAE9E;;GAEG;AACoB,wBAAO,GAAG,IAAI,4BAAiB,CAClD,gBAAgB,CAAC,QAAQ,EACzB,gBAAgB,EAChB,EAAE,EACF,EAAE,CACL,CAAC;AAyPN;;GAEG;AACH,kCAAqB,CAAC,mBAAmB,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the Microsoft Live Share SDK License.
4
+ */
5
+ import { IMediaPlayer } from './IMediaPlayer';
6
+ export declare enum LevelType {
7
+ fixed = 0,
8
+ percentage = 1
9
+ }
10
+ export declare class VolumeLimiter {
11
+ private readonly _player;
12
+ private readonly _duration;
13
+ private readonly _rampDownDuration;
14
+ private readonly _rampUpDuration;
15
+ private _level;
16
+ private _levelType;
17
+ private _running;
18
+ private _endTime;
19
+ private _startTime;
20
+ private _startVolume;
21
+ private _inRamp;
22
+ constructor(player: IMediaPlayer);
23
+ /**
24
+ * Time, in seconds, that the volume should be lowered.
25
+ *
26
+ * @remarks
27
+ * Applications should periodically call `lowerVolume()` to keep the volume lowered.
28
+ */
29
+ get duration(): number;
30
+ set duration(value: number);
31
+ /**
32
+ * Target level to lower volume to.
33
+ *
34
+ * @remarks
35
+ * Expressed as a value between 0.0 and 1.0. The value is applied based upon the configured
36
+ * `levelType`. The default value is 0.2.
37
+ *
38
+ * For a level type of `LevelType.fixed` the value is the exact level the volume will be
39
+ * lowered to. The default value of 0.2 would cause the volume to be lowered to 0.2.
40
+ *
41
+ * For a level type of `LevelType.percentage` the value is the percentage by which the volume
42
+ * level should be lowered to. The default value of 0.2 would cause the volume to be lowered
43
+ * to 20% of its starting value.
44
+ */
45
+ get level(): number;
46
+ set level(value: number);
47
+ /**
48
+ * The type of level represented by the `level` property.
49
+ */
50
+ get levelType(): LevelType;
51
+ set levelType(value: LevelType);
52
+ /**
53
+ * Amount of time, in seconds, it should take to ramp the volume down to the desired level.
54
+ */
55
+ get rampDownDuration(): number;
56
+ set rampDownDuration(value: number);
57
+ /**
58
+ * Amount of time, in seconds, it should take to ramp the volume back up to the original level.
59
+ */
60
+ get rampUpDuration(): number;
61
+ set rampUpDuration(value: number);
62
+ /**
63
+ * Temporarily lowers an audio sources volume.
64
+ */
65
+ lowerVolume(): void;
66
+ private startLimiter;
67
+ private scheduleAnimationFrame;
68
+ private computeTargetVolume;
69
+ }
70
+ //# sourceMappingURL=VolumeLimiter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VolumeLimiter.d.ts","sourceRoot":"","sources":["../src/VolumeLimiter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE/C,oBAAY,SAAS;IAAG,KAAK,IAAA;IAAE,UAAU,IAAA;CAAE;AAE3C,qBAAa,aAAa;IACtB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IAGvC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0B;IACpD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAyB;IAC3D,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAyB;IACzD,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,UAAU,CAA8B;IAGhD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,QAAQ,CAAK;IACrB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,OAAO,CAAS;gBAEZ,MAAM,EAAE,YAAY;IAIhC;;;;;OAKG;IACH,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,MAAM,EAEhC;IAED;;;;;;;;;;;;;OAaG;IACH,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAM7B;IAED;;OAEG;IACH,IAAW,SAAS,IAA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