@microsoft/live-share-media 1.0.0-preview.12 → 1.0.0-preview.13

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 (68) hide show
  1. package/README.md +1 -1
  2. package/bin/IMediaPlayer.d.ts +20 -20
  3. package/bin/IMediaPlayer.js +6 -6
  4. package/bin/LiveMediaSession.d.ts +95 -94
  5. package/bin/LiveMediaSession.d.ts.map +1 -1
  6. package/bin/LiveMediaSession.js +235 -231
  7. package/bin/LiveMediaSession.js.map +1 -1
  8. package/bin/LiveMediaSessionCoordinator.d.ts +238 -227
  9. package/bin/LiveMediaSessionCoordinator.d.ts.map +1 -1
  10. package/bin/LiveMediaSessionCoordinator.js +476 -407
  11. package/bin/LiveMediaSessionCoordinator.js.map +1 -1
  12. package/bin/LiveMediaSessionCoordinatorSuspension.d.ts +19 -19
  13. package/bin/LiveMediaSessionCoordinatorSuspension.js +27 -27
  14. package/bin/MediaPlayerSynchronizer.d.ts +173 -163
  15. package/bin/MediaPlayerSynchronizer.d.ts.map +1 -1
  16. package/bin/MediaPlayerSynchronizer.js +491 -468
  17. package/bin/MediaPlayerSynchronizer.js.map +1 -1
  18. package/bin/MediaSessionActionThrottler.d.ts +11 -11
  19. package/bin/MediaSessionActionThrottler.js +13 -13
  20. package/bin/MediaSessionExtensions.d.ts +34 -34
  21. package/bin/MediaSessionExtensions.d.ts.map +1 -1
  22. package/bin/MediaSessionExtensions.js +12 -12
  23. package/bin/RepeatedActionThrottler.d.ts +19 -19
  24. package/bin/RepeatedActionThrottler.js +62 -62
  25. package/bin/RepeatedActionThrottler.js.map +1 -1
  26. package/bin/VolumeManager.d.ts +83 -83
  27. package/bin/VolumeManager.js +174 -174
  28. package/bin/index.d.ts +13 -13
  29. package/bin/index.js +29 -29
  30. package/bin/internals/GroupCoordinatorState.d.ts +93 -92
  31. package/bin/internals/GroupCoordinatorState.d.ts.map +1 -1
  32. package/bin/internals/GroupCoordinatorState.js +407 -404
  33. package/bin/internals/GroupCoordinatorState.js.map +1 -1
  34. package/bin/internals/GroupPlaybackPosition.d.ts +67 -66
  35. package/bin/internals/GroupPlaybackPosition.d.ts.map +1 -1
  36. package/bin/internals/GroupPlaybackPosition.js +166 -166
  37. package/bin/internals/GroupPlaybackPosition.js.map +1 -1
  38. package/bin/internals/GroupPlaybackTrack.d.ts +45 -45
  39. package/bin/internals/GroupPlaybackTrack.d.ts.map +1 -1
  40. package/bin/internals/GroupPlaybackTrack.js +121 -121
  41. package/bin/internals/GroupPlaybackTrackData.d.ts +39 -39
  42. package/bin/internals/GroupPlaybackTrackData.d.ts.map +1 -1
  43. package/bin/internals/GroupPlaybackTrackData.js +69 -69
  44. package/bin/internals/GroupTransportState.d.ts +49 -48
  45. package/bin/internals/GroupTransportState.d.ts.map +1 -1
  46. package/bin/internals/GroupTransportState.js +111 -111
  47. package/bin/internals/GroupTransportState.js.map +1 -1
  48. package/bin/internals/consts.d.ts +75 -72
  49. package/bin/internals/consts.d.ts.map +1 -1
  50. package/bin/internals/consts.js +84 -81
  51. package/bin/internals/consts.js.map +1 -1
  52. package/bin/internals/index.d.ts +10 -10
  53. package/bin/internals/index.js +26 -26
  54. package/package.json +4 -4
  55. package/src/LiveMediaSession.ts +24 -12
  56. package/src/LiveMediaSessionCoordinator.ts +101 -29
  57. package/src/MediaPlayerSynchronizer.ts +30 -14
  58. package/src/internals/GroupCoordinatorState.ts +49 -35
  59. package/src/internals/GroupPlaybackPosition.ts +6 -2
  60. package/src/internals/GroupPlaybackTrack.ts +2 -2
  61. package/src/internals/GroupPlaybackTrackData.ts +2 -2
  62. package/src/internals/GroupTransportState.ts +11 -4
  63. package/src/internals/consts.ts +4 -0
  64. package/src/test/GroupPlaybackPosition.spec.ts +0 -600
  65. package/src/test/GroupPlaybackTrack.spec.ts +0 -122
  66. package/src/test/SharedMediaSession.spec.ts +0 -149
  67. package/src/test/SharedMediaSessionCoordinator.spec.ts +0 -271
  68. package/src/test/VolumeManager.spec.ts +0 -219
@@ -1,232 +1,236 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.LiveMediaSession = void 0;
17
- const aqueduct_1 = require("@fluidframework/aqueduct");
18
- const live_share_1 = require("@microsoft/live-share");
19
- const MediaPlayerSynchronizer_1 = require("./MediaPlayerSynchronizer");
20
- const internals_1 = require("./internals");
21
- const MediaSessionExtensions_1 = require("./MediaSessionExtensions");
22
- const LiveMediaSessionCoordinator_1 = require("./LiveMediaSessionCoordinator");
23
- const RepeatedActionThrottler_1 = require("./RepeatedActionThrottler");
24
- /**
25
- * Live fluid object that synchronizes media playback across multiple clients.
26
- */
27
- class LiveMediaSession extends aqueduct_1.DataObject {
28
- constructor() {
29
- super(...arguments);
30
- this._actionThrottler = new RepeatedActionThrottler_1.RepeatedActionThrottler();
31
- this._actionHandlers = new Map();
32
- this._lastUpdateTime = 0;
33
- }
34
- /**
35
- * Extension point that lets applications replace the default logic for throttling the sessions
36
- * local sync behavior.
37
- *
38
- * @remarks
39
- * The `LiveMediaCoordinator` is fairly aggressive at wanting to keep the local media player
40
- * in sync with the rest of the group. This aggressiveness can result in the coordinator sending
41
- * new sync actions before the local player has finished responding to the previous sync action.
42
- * The `ActionThrottler` gives apps fine grain control over how aggressive they want sync to be.
43
- *
44
- * By default, a `RepeatedAction` throttler is used which prevents the same sync action from
45
- * being sent within an adjustable time period.
46
- */
47
- get actionThrottler() {
48
- return this._actionThrottler;
49
- }
50
- set actionThrottler(value) {
51
- this._actionThrottler = value;
52
- }
53
- /**
54
- * Returns true if the object has been initialized.
55
- */
56
- get isInitialized() {
57
- return this.coordinator.isInitialized;
58
- }
59
- /**
60
- * @deprecated isInitialized should be used instead
61
- * Returns true if the object has been initialized.
62
- */
63
- get isStarted() {
64
- return this.isInitialized;
65
- }
66
- /**
67
- * The group coordinator for the session.
68
- */
69
- get coordinator() {
70
- return this._coordinator;
71
- }
72
- /**
73
- * Returns the logger used by the session and coordinator.
74
- *
75
- * @remarks
76
- * This is used by the `MediaPlayerSynchronizer` to log events.
77
- */
78
- get logger() {
79
- return this._logger;
80
- }
81
- /**
82
- * initialize the object.
83
- * @param acceptTransportChangesFrom Optional. List of roles allowed to group transport
84
- * operations like play/pause/seek/setTrack.
85
- */
86
- initialize(acceptTransportChangesFrom) {
87
- return this.coordinator.initialize(acceptTransportChangesFrom);
88
- }
89
- /**
90
- * Registers an action handler with the session.
91
- * @param action Name of the action to register a handler for.
92
- * @param handler Function called when the action is triggered.
93
- */
94
- setActionHandler(action, handler) {
95
- if (handler) {
96
- // add handler
97
- this._actionHandlers.set(action, handler);
98
- }
99
- else if (this._actionHandlers.has(action)) {
100
- // remove handler
101
- this._actionHandlers.delete(action);
102
- }
103
- }
104
- /**
105
- * Registers a handler that will be queried anytime the group coordinate needs to know the
106
- * local players transport state and position.
107
- */
108
- setRequestPlayerStateHandler(handler) {
109
- this._requestPlayerStateHandler = handler;
110
- }
111
- /**
112
- * Begins synchronizing the playback of a media element.
113
- * @param player Something that "looks like" and HTML Media Element.
114
- * @returns A new synchronizer instance. Call `synchronizer.end()` to stop synchronizing the elements playback.
115
- */
116
- synchronize(player) {
117
- // A session can only synchronize one player at a time
118
- if (this._synchronizing) {
119
- this._synchronizing.end();
120
- }
121
- // Start position update timer
122
- if (!this._updateTimer) {
123
- this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.BeginPositionUpdateTimer);
124
- this._updateTimer = setInterval(() => {
125
- // Get current state
126
- const state = this.getCurrentPlayerState();
127
- // Check for hit wait point
128
- this.checkWaitPointHit(state);
129
- // Send position update if interval hit
130
- const now = new Date().getTime();
131
- const delta = (now - this._lastUpdateTime) / 1000;
132
- if (this.coordinator.isInitialized &&
133
- delta >= this.coordinator.positionUpdateInterval) {
134
- this._lastUpdateTime = now;
135
- this.coordinator.sendPositionUpdate(state);
136
- }
137
- }, 500);
138
- }
139
- return new MediaPlayerSynchronizer_1.MediaPlayerSynchronizer(player, this, () => {
140
- this._synchronizing = undefined;
141
- });
142
- }
143
- hasInitialized() {
144
- return __awaiter(this, void 0, void 0, function* () {
145
- this._logger = new live_share_1.LiveTelemetryLogger(this.runtime);
146
- // Create coordinator and listen for triggered actions
147
- this._coordinator = new LiveMediaSessionCoordinator_1.LiveMediaSessionCoordinator(this.runtime, () => this.getCurrentPlayerState());
148
- this._coordinator.on(MediaSessionExtensions_1.MediaSessionCoordinatorEvents.triggeraction, (event) => {
149
- // Pre-process actions
150
- const details = event.details;
151
- const seekTime = typeof details.seekTime == "number" ? details.seekTime : -1;
152
- switch (details.action) {
153
- case "play":
154
- this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.PlayAction, null, {
155
- position: seekTime,
156
- });
157
- break;
158
- case "pause":
159
- this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.PauseAction, null, {
160
- position: seekTime,
161
- });
162
- break;
163
- case "seekto":
164
- this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.SeekToAction, null, {
165
- position: seekTime,
166
- });
167
- break;
168
- case "settrack":
169
- this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.SetTrackAction);
170
- break;
171
- case "datachange":
172
- this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.DataChangeAction);
173
- break;
174
- case "catchup":
175
- // Default to seekto if catchup not implemented
176
- this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.CatchUpAction, null, {
177
- position: seekTime,
178
- });
179
- if (!this._actionHandlers.has("catchup")) {
180
- details.action = "seekto";
181
- }
182
- break;
183
- }
184
- // Dispatch action
185
- this.dispatchAction(details);
186
- });
187
- });
188
- }
189
- checkWaitPointHit(state) {
190
- // Was a wait point hit?
191
- if (state.positionState && this.coordinator.isInitialized) {
192
- const waitPoint = this.coordinator.findNextWaitPoint();
193
- if (waitPoint &&
194
- state.positionState.position != undefined &&
195
- state.positionState.position >= waitPoint.position) {
196
- // Ensure handler registered
197
- if (!this._actionHandlers.has("wait")) {
198
- throw new Error(`SharedMediaSession: wait point hit but no 'wait' action registered.`);
199
- }
200
- // Begin suspension for wait point
201
- const suspension = this.coordinator.beginSuspension(waitPoint);
202
- this.dispatchAction({ action: "wait", suspension: suspension });
203
- }
204
- }
205
- }
206
- getCurrentPlayerState() {
207
- if (!this._requestPlayerStateHandler) {
208
- throw new Error(`SharedMediaSession: no getPlayerState callback configured.`);
209
- }
210
- return this._requestPlayerStateHandler();
211
- }
212
- dispatchAction(details) {
213
- if (this._actionHandlers.has(details.action)) {
214
- const handler = this._actionHandlers.get(details.action);
215
- this._actionThrottler.throttled(details, handler);
216
- }
217
- }
218
- }
219
- exports.LiveMediaSession = LiveMediaSession;
220
- /**
221
- * The objects fluid type name.
222
- */
223
- LiveMediaSession.TypeName = `@microsoft/fluid-media:SharedMediaSession`;
224
- /**
225
- * The objects fluid type factory.
226
- */
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);
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
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.LiveMediaSession = void 0;
17
+ const aqueduct_1 = require("@fluidframework/aqueduct");
18
+ const live_share_1 = require("@microsoft/live-share");
19
+ const MediaPlayerSynchronizer_1 = require("./MediaPlayerSynchronizer");
20
+ const internals_1 = require("./internals");
21
+ const MediaSessionExtensions_1 = require("./MediaSessionExtensions");
22
+ const LiveMediaSessionCoordinator_1 = require("./LiveMediaSessionCoordinator");
23
+ const RepeatedActionThrottler_1 = require("./RepeatedActionThrottler");
24
+ /**
25
+ * Live fluid object that synchronizes media playback across multiple clients.
26
+ */
27
+ class LiveMediaSession extends live_share_1.LiveDataObject {
28
+ constructor() {
29
+ super(...arguments);
30
+ this._actionThrottler = new RepeatedActionThrottler_1.RepeatedActionThrottler();
31
+ this._actionHandlers = new Map();
32
+ this._lastUpdateTime = 0;
33
+ }
34
+ /**
35
+ * Extension point that lets applications replace the default logic for throttling the sessions
36
+ * local sync behavior.
37
+ *
38
+ * @remarks
39
+ * The `LiveMediaCoordinator` is fairly aggressive at wanting to keep the local media player
40
+ * in sync with the rest of the group. This aggressiveness can result in the coordinator sending
41
+ * new sync actions before the local player has finished responding to the previous sync action.
42
+ * The `ActionThrottler` gives apps fine grain control over how aggressive they want sync to be.
43
+ *
44
+ * By default, a `RepeatedAction` throttler is used which prevents the same sync action from
45
+ * being sent within an adjustable time period.
46
+ */
47
+ get actionThrottler() {
48
+ return this._actionThrottler;
49
+ }
50
+ set actionThrottler(value) {
51
+ this._actionThrottler = value;
52
+ }
53
+ /**
54
+ * Returns true if the object has been initialized.
55
+ */
56
+ get isInitialized() {
57
+ return this.coordinator.isInitialized;
58
+ }
59
+ /**
60
+ * @deprecated isInitialized should be used instead
61
+ * Returns true if the object has been initialized.
62
+ */
63
+ get isStarted() {
64
+ return this.isInitialized;
65
+ }
66
+ /**
67
+ * The group coordinator for the session.
68
+ */
69
+ get coordinator() {
70
+ return this._coordinator;
71
+ }
72
+ /**
73
+ * Returns the logger used by the session and coordinator.
74
+ *
75
+ * @remarks
76
+ * This is used by the `MediaPlayerSynchronizer` to log events.
77
+ */
78
+ get logger() {
79
+ return this._logger;
80
+ }
81
+ /**
82
+ * initialize the object.
83
+ * @param allowedRoles Optional. List of roles allowed to group transport
84
+ * operations like play/pause/seek/setTrack.
85
+ * @returns a void promise that resolves once complete
86
+ */
87
+ initialize(allowedRoles) {
88
+ if (allowedRoles) {
89
+ this._allowedRoles = allowedRoles;
90
+ }
91
+ return this.coordinator.initialize(allowedRoles);
92
+ }
93
+ /**
94
+ * Registers an action handler with the session.
95
+ * @param action Name of the action to register a handler for.
96
+ * @param handler Function called when the action is triggered.
97
+ */
98
+ setActionHandler(action, handler) {
99
+ if (handler) {
100
+ // add handler
101
+ this._actionHandlers.set(action, handler);
102
+ }
103
+ else if (this._actionHandlers.has(action)) {
104
+ // remove handler
105
+ this._actionHandlers.delete(action);
106
+ }
107
+ }
108
+ /**
109
+ * Registers a handler that will be queried anytime the group coordinate needs to know the
110
+ * local players transport state and position.
111
+ */
112
+ setRequestPlayerStateHandler(handler) {
113
+ this._requestPlayerStateHandler = handler;
114
+ }
115
+ /**
116
+ * Begins synchronizing the playback of a media element.
117
+ * @param player Something that "looks like" and HTML Media Element.
118
+ * @returns A new synchronizer instance. Call `synchronizer.end()` to stop synchronizing the elements playback.
119
+ */
120
+ synchronize(player) {
121
+ // A session can only synchronize one player at a time
122
+ if (this._synchronizing) {
123
+ this._synchronizing.end();
124
+ }
125
+ // Start position update timer
126
+ if (!this._updateTimer) {
127
+ this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.BeginPositionUpdateTimer);
128
+ this._updateTimer = setInterval(() => {
129
+ // Get current state
130
+ const state = this.getCurrentPlayerState();
131
+ // Check for hit wait point
132
+ this.checkWaitPointHit(state);
133
+ // Send position update if interval hit
134
+ const now = new Date().getTime();
135
+ const delta = (now - this._lastUpdateTime) / 1000;
136
+ if (this.coordinator.isInitialized &&
137
+ delta >= this.coordinator.positionUpdateInterval) {
138
+ this._lastUpdateTime = now;
139
+ this.coordinator.sendPositionUpdate(state);
140
+ }
141
+ }, 500);
142
+ }
143
+ return new MediaPlayerSynchronizer_1.MediaPlayerSynchronizer(player, this, () => {
144
+ this._synchronizing = undefined;
145
+ });
146
+ }
147
+ hasInitialized() {
148
+ return __awaiter(this, void 0, void 0, function* () {
149
+ this._logger = new live_share_1.LiveTelemetryLogger(this.runtime, this.liveRuntime);
150
+ // Create coordinator and listen for triggered actions
151
+ this._coordinator = new LiveMediaSessionCoordinator_1.LiveMediaSessionCoordinator(this.runtime, this.liveRuntime, () => this.getCurrentPlayerState());
152
+ this._coordinator.on(MediaSessionExtensions_1.MediaSessionCoordinatorEvents.triggeraction, (event) => {
153
+ // Pre-process actions
154
+ const details = event.details;
155
+ const seekTime = typeof details.seekTime == "number" ? details.seekTime : -1;
156
+ switch (details.action) {
157
+ case "play":
158
+ this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.PlayAction, null, {
159
+ position: seekTime,
160
+ });
161
+ break;
162
+ case "pause":
163
+ this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.PauseAction, null, {
164
+ position: seekTime,
165
+ });
166
+ break;
167
+ case "seekto":
168
+ this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.SeekToAction, null, {
169
+ position: seekTime,
170
+ });
171
+ break;
172
+ case "settrack":
173
+ this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.SetTrackAction);
174
+ break;
175
+ case "datachange":
176
+ this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.DataChangeAction);
177
+ break;
178
+ case "catchup":
179
+ // Default to seekto if catchup not implemented
180
+ this.logger.sendTelemetryEvent(internals_1.TelemetryEvents.MediaSession.CatchUpAction, null, {
181
+ position: seekTime,
182
+ });
183
+ if (!this._actionHandlers.has("catchup")) {
184
+ details.action = "seekto";
185
+ }
186
+ break;
187
+ }
188
+ // Dispatch action
189
+ this.dispatchAction(details);
190
+ });
191
+ });
192
+ }
193
+ checkWaitPointHit(state) {
194
+ // Was a wait point hit?
195
+ if (state.positionState && this.coordinator.isInitialized) {
196
+ const waitPoint = this.coordinator.findNextWaitPoint();
197
+ if (waitPoint &&
198
+ state.positionState.position != undefined &&
199
+ state.positionState.position >= waitPoint.position) {
200
+ // Ensure handler registered
201
+ if (!this._actionHandlers.has("wait")) {
202
+ throw new Error(`SharedMediaSession: wait point hit but no 'wait' action registered.`);
203
+ }
204
+ // Begin suspension for wait point
205
+ const suspension = this.coordinator.beginSuspension(waitPoint);
206
+ this.dispatchAction({ action: "wait", suspension: suspension });
207
+ }
208
+ }
209
+ }
210
+ getCurrentPlayerState() {
211
+ if (!this._requestPlayerStateHandler) {
212
+ throw new Error(`SharedMediaSession: no getPlayerState callback configured.`);
213
+ }
214
+ return this._requestPlayerStateHandler();
215
+ }
216
+ dispatchAction(details) {
217
+ if (this._actionHandlers.has(details.action)) {
218
+ const handler = this._actionHandlers.get(details.action);
219
+ this._actionThrottler.throttled(details, handler);
220
+ }
221
+ }
222
+ }
223
+ /**
224
+ * The objects fluid type name.
225
+ */
226
+ LiveMediaSession.TypeName = `@microsoft/fluid-media:SharedMediaSession`;
227
+ /**
228
+ * The objects fluid type factory.
229
+ */
230
+ LiveMediaSession.factory = new aqueduct_1.DataObjectFactory(LiveMediaSession.TypeName, LiveMediaSession, [], {});
231
+ exports.LiveMediaSession = LiveMediaSession;
232
+ /**
233
+ * Register `LiveMediaSession` as an available `LoadableObjectClass` for use in packages that support dynamic object loading, such as `@microsoft/live-share-turbo`.
234
+ */
235
+ live_share_1.DynamicObjectRegistry.registerObjectClass(LiveMediaSession, LiveMediaSession.TypeName);
232
236
  //# sourceMappingURL=LiveMediaSession.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LiveMediaSession.js","sourceRoot":"","sources":["../src/LiveMediaSession.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;AAEH,uDAAyE;AACzE,sDAAoG;AACpG,uEAAoE;AACpE,2CAAmE;AACnE,qEAIkC;AAClC,+EAGuC;AAEvC,uEAAoE;AAGpE;;GAEG;AACH,MAAa,gBAAiB,SAAQ,qBAAU;IAAhD;;QACY,qBAAgB,GACpB,IAAI,iDAAuB,EAAE,CAAC;QAIjB,oBAAe,GAC5B,IAAI,GAAG,EAAE,CAAC;QAKN,oBAAe,GAAW,CAAC,CAAC;IAsQxC,CAAC;IArPG;;;;;;;;;;;;OAYG;IACH,IAAW,eAAe;QACtB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,IAAW,eAAe,CAAC,KAAkC;QACzD,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,IAAW,aAAa;QACpB,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,YAAa,CAAC;IAC9B,CAAC;IAED;;;;;OAKG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAQ,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACI,UAAU,CACb,0BAA8C;QAE9C,OAAO,IAAI,CAAC,WAAW,CAAC,U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