@microsoft/live-share-media 1.2.2 → 1.3.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.
Files changed (54) hide show
  1. package/.nycrc.json +10 -10
  2. package/LICENSE +90 -90
  3. package/README.md +135 -135
  4. package/bin/LiveMediaSession.d.ts.map +1 -1
  5. package/bin/LiveMediaSession.js +4 -6
  6. package/bin/LiveMediaSession.js.map +1 -1
  7. package/bin/LiveMediaSessionCoordinator.d.ts +4 -3
  8. package/bin/LiveMediaSessionCoordinator.d.ts.map +1 -1
  9. package/bin/LiveMediaSessionCoordinator.js +56 -69
  10. package/bin/LiveMediaSessionCoordinator.js.map +1 -1
  11. package/bin/MediaPlayerSynchronizer.d.ts +12 -0
  12. package/bin/MediaPlayerSynchronizer.d.ts.map +1 -1
  13. package/bin/MediaPlayerSynchronizer.js +26 -6
  14. package/bin/MediaPlayerSynchronizer.js.map +1 -1
  15. package/bin/MediaSessionExtensions.d.ts +0 -4
  16. package/bin/MediaSessionExtensions.d.ts.map +1 -1
  17. package/bin/MediaSessionExtensions.js.map +1 -1
  18. package/bin/internals/GroupCoordinatorState.d.ts.map +1 -1
  19. package/bin/internals/GroupCoordinatorState.js +1 -1
  20. package/bin/internals/GroupCoordinatorState.js.map +1 -1
  21. package/bin/internals/consts.d.ts +2 -2
  22. package/bin/internals/consts.d.ts.map +1 -1
  23. package/bin/internals/consts.js +2 -2
  24. package/bin/internals/consts.js.map +1 -1
  25. package/bin/internals/errors.d.ts +17 -0
  26. package/bin/internals/errors.d.ts.map +1 -0
  27. package/bin/internals/errors.js +34 -0
  28. package/bin/internals/errors.js.map +1 -0
  29. package/bin/internals/index.d.ts +1 -0
  30. package/bin/internals/index.d.ts.map +1 -1
  31. package/bin/internals/index.js +1 -0
  32. package/bin/internals/index.js.map +1 -1
  33. package/package.json +45 -45
  34. package/src/IMediaPlayer.ts +29 -29
  35. package/src/LiveMediaSession.ts +337 -334
  36. package/src/LiveMediaSessionCoordinator.ts +711 -671
  37. package/src/LiveMediaSessionCoordinatorSuspension.ts +39 -39
  38. package/src/MediaPlayerSynchronizer.ts +714 -690
  39. package/src/MediaSessionActionThrottler.ts +19 -19
  40. package/src/MediaSessionExtensions.ts +182 -187
  41. package/src/RepeatedActionThrottler.ts +76 -76
  42. package/src/VolumeManager.ts +200 -200
  43. package/src/index.ts +14 -14
  44. package/src/internals/GroupCoordinatorState.ts +685 -683
  45. package/src/internals/GroupPlaybackPosition.ts +228 -228
  46. package/src/internals/GroupPlaybackTrack.ts +182 -182
  47. package/src/internals/GroupPlaybackTrackData.ts +104 -104
  48. package/src/internals/GroupTransportState.ts +170 -170
  49. package/src/internals/consts.ts +103 -102
  50. package/src/internals/errors.ts +42 -0
  51. package/src/internals/index.ts +12 -11
  52. package/tsconfig.build.json +8 -8
  53. package/tsconfig.json +76 -76
  54. package/typedoc.json +10 -10
@@ -1,39 +1,39 @@
1
- /**
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the Microsoft Live Share SDK License.
4
- */
5
-
6
- import {
7
- MediaSessionCoordinatorSuspension,
8
- CoordinationWaitPoint,
9
- } from "./MediaSessionExtensions";
10
-
11
- export class LiveMediaSessionCoordinatorSuspension
12
- implements MediaSessionCoordinatorSuspension
13
- {
14
- private _waitPoint?: CoordinationWaitPoint;
15
- private _onEnd: (seekTo?: number) => void;
16
-
17
- constructor(
18
- waitPoint: CoordinationWaitPoint | undefined,
19
- onEnd: (seekTo?: number) => void
20
- ) {
21
- this._waitPoint = waitPoint;
22
- this._onEnd = onEnd;
23
- }
24
-
25
- /**
26
- * Returns an optional wait point associated with the suspension.
27
- */
28
- public get waitPoint(): CoordinationWaitPoint | undefined {
29
- return this._waitPoint;
30
- }
31
-
32
- /**
33
- * Ends the suspension and optionally proposes a time to seek to.
34
- * @param seekTo Optional. Proposed time to seek to. Ignored for suspensions at wait points.
35
- */
36
- public end(seekTo?: number): void {
37
- this._onEnd(seekTo);
38
- }
39
- }
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the Microsoft Live Share SDK License.
4
+ */
5
+
6
+ import {
7
+ MediaSessionCoordinatorSuspension,
8
+ CoordinationWaitPoint,
9
+ } from "./MediaSessionExtensions";
10
+
11
+ export class LiveMediaSessionCoordinatorSuspension
12
+ implements MediaSessionCoordinatorSuspension
13
+ {
14
+ private _waitPoint?: CoordinationWaitPoint;
15
+ private _onEnd: (seekTo?: number) => void;
16
+
17
+ constructor(
18
+ waitPoint: CoordinationWaitPoint | undefined,
19
+ onEnd: (seekTo?: number) => void
20
+ ) {
21
+ this._waitPoint = waitPoint;
22
+ this._onEnd = onEnd;
23
+ }
24
+
25
+ /**
26
+ * Returns an optional wait point associated with the suspension.
27
+ */
28
+ public get waitPoint(): CoordinationWaitPoint | undefined {
29
+ return this._waitPoint;
30
+ }
31
+
32
+ /**
33
+ * Ends the suspension and optionally proposes a time to seek to.
34
+ * @param seekTo Optional. Proposed time to seek to. Ignored for suspensions at wait points.
35
+ */
36
+ public end(seekTo?: number): void {
37
+ this._onEnd(seekTo);
38
+ }
39
+ }