@microsoft/live-share-media 1.0.0-preview.1 → 1.0.0-preview.3

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 (96) hide show
  1. package/README.md +1 -1
  2. package/bin/IMediaPlayer.d.ts.map +1 -1
  3. package/bin/LiveMediaSession.d.ts +7 -7
  4. package/bin/LiveMediaSession.d.ts.map +1 -1
  5. package/bin/LiveMediaSession.js +28 -17
  6. package/bin/LiveMediaSession.js.map +1 -1
  7. package/bin/LiveMediaSessionCoordinator.d.ts +2 -2
  8. package/bin/LiveMediaSessionCoordinator.d.ts.map +1 -1
  9. package/bin/LiveMediaSessionCoordinator.js +34 -22
  10. package/bin/LiveMediaSessionCoordinator.js.map +1 -1
  11. package/bin/LiveMediaSessionCoordinatorSuspension.d.ts +1 -1
  12. package/bin/LiveMediaSessionCoordinatorSuspension.d.ts.map +1 -1
  13. package/bin/LiveMediaSessionCoordinatorSuspension.js.map +1 -1
  14. package/bin/MediaPlayerSynchronizer.d.ts +7 -7
  15. package/bin/MediaPlayerSynchronizer.d.ts.map +1 -1
  16. package/bin/MediaPlayerSynchronizer.js +121 -69
  17. package/bin/MediaPlayerSynchronizer.js.map +1 -1
  18. package/bin/MediaSessionActionThrottler.d.ts +1 -1
  19. package/bin/MediaSessionActionThrottler.d.ts.map +1 -1
  20. package/bin/MediaSessionActionThrottler.js.map +1 -1
  21. package/bin/MediaSessionExtensions.d.ts.map +1 -1
  22. package/bin/RepeatedActionThrottler.d.ts +2 -2
  23. package/bin/RepeatedActionThrottler.d.ts.map +1 -1
  24. package/bin/RepeatedActionThrottler.js +9 -3
  25. package/bin/RepeatedActionThrottler.js.map +1 -1
  26. package/bin/VolumeManager.d.ts +1 -1
  27. package/bin/VolumeManager.d.ts.map +1 -1
  28. package/bin/VolumeManager.js +4 -2
  29. package/bin/VolumeManager.js.map +1 -1
  30. package/bin/index.d.ts +9 -9
  31. package/bin/index.d.ts.map +1 -1
  32. package/bin/index.js.map +1 -1
  33. package/bin/internals/GroupCoordinatorState.d.ts +8 -8
  34. package/bin/internals/GroupCoordinatorState.d.ts.map +1 -1
  35. package/bin/internals/GroupCoordinatorState.js +91 -53
  36. package/bin/internals/GroupCoordinatorState.js.map +1 -1
  37. package/bin/internals/GroupPlaybackPosition.d.ts +3 -3
  38. package/bin/internals/GroupPlaybackPosition.d.ts.map +1 -1
  39. package/bin/internals/GroupPlaybackPosition.js +22 -13
  40. package/bin/internals/GroupPlaybackPosition.js.map +1 -1
  41. package/bin/internals/GroupPlaybackTrack.d.ts +4 -4
  42. package/bin/internals/GroupPlaybackTrack.d.ts.map +1 -1
  43. package/bin/internals/GroupPlaybackTrack.js +14 -4
  44. package/bin/internals/GroupPlaybackTrack.js.map +1 -1
  45. package/bin/internals/GroupPlaybackTrackData.d.ts +3 -3
  46. package/bin/internals/GroupPlaybackTrackData.d.ts.map +1 -1
  47. package/bin/internals/GroupPlaybackTrackData.js +8 -4
  48. package/bin/internals/GroupPlaybackTrackData.js.map +1 -1
  49. package/bin/internals/GroupTransportState.d.ts +5 -5
  50. package/bin/internals/GroupTransportState.d.ts.map +1 -1
  51. package/bin/internals/GroupTransportState.js +27 -12
  52. package/bin/internals/GroupTransportState.js.map +1 -1
  53. package/bin/internals/consts.d.ts.map +1 -1
  54. package/bin/internals/consts.js +54 -54
  55. package/bin/internals/consts.js.map +1 -1
  56. package/bin/internals/index.d.ts +6 -6
  57. package/package.json +3 -3
  58. package/src/IMediaPlayer.ts +10 -2
  59. package/src/LiveMediaSession.ts +133 -71
  60. package/src/LiveMediaSessionCoordinator.ts +302 -142
  61. package/src/LiveMediaSessionCoordinatorSuspension.ts +13 -5
  62. package/src/MediaPlayerSynchronizer.ts +317 -146
  63. package/src/MediaSessionActionThrottler.ts +5 -3
  64. package/src/MediaSessionExtensions.ts +15 -5
  65. package/src/RepeatedActionThrottler.ts +27 -9
  66. package/src/VolumeManager.ts +24 -12
  67. package/src/index.ts +9 -10
  68. package/src/internals/GroupCoordinatorState.ts +274 -114
  69. package/src/internals/GroupPlaybackPosition.ts +61 -27
  70. package/src/internals/GroupPlaybackTrack.ts +51 -22
  71. package/src/internals/GroupPlaybackTrackData.ts +24 -16
  72. package/src/internals/GroupTransportState.ts +53 -23
  73. package/src/internals/consts.ts +73 -55
  74. package/src/internals/index.ts +6 -6
  75. package/src/test/GroupPlaybackPosition.spec.ts +371 -111
  76. package/src/test/GroupPlaybackTrack.spec.ts +91 -35
  77. package/src/test/SharedMediaSession.spec.ts +64 -28
  78. package/src/test/SharedMediaSessionCoordinator.spec.ts +86 -46
  79. package/src/test/VolumeManager.spec.ts +38 -31
  80. package/tsconfig.json +1 -0
  81. package/bin/EphemeralMediaSession.d.ts +0 -102
  82. package/bin/EphemeralMediaSession.d.ts.map +0 -1
  83. package/bin/EphemeralMediaSession.js +0 -226
  84. package/bin/EphemeralMediaSession.js.map +0 -1
  85. package/bin/EphemeralMediaSessionCoordinator.d.ts +0 -228
  86. package/bin/EphemeralMediaSessionCoordinator.d.ts.map +0 -1
  87. package/bin/EphemeralMediaSessionCoordinator.js +0 -396
  88. package/bin/EphemeralMediaSessionCoordinator.js.map +0 -1
  89. package/bin/EphemeralMediaSessionCoordinatorSuspension.d.ts +0 -20
  90. package/bin/EphemeralMediaSessionCoordinatorSuspension.d.ts.map +0 -1
  91. package/bin/EphemeralMediaSessionCoordinatorSuspension.js +0 -28
  92. package/bin/EphemeralMediaSessionCoordinatorSuspension.js.map +0 -1
  93. package/bin/VolumeLimiter.d.ts +0 -70
  94. package/bin/VolumeLimiter.d.ts.map +0 -1
  95. package/bin/VolumeLimiter.js +0 -170
  96. package/bin/VolumeLimiter.js.map +0 -1
@@ -1,28 +0,0 @@
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
@@ -1 +0,0 @@
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,70 +0,0 @@
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
@@ -1 +0,0 @@
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,IAAI,SAAS,CAEhC;IAED,IAAW,SAAS,CAAC,KAAK,EAAE,SAAS,EAEpC;IAED;;OAEG;IACH,IAAW,gBAAgB,IAAI,MAAM,CAEpC;IAED,IAAW,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAExC;IAED;;OAEG;IACF,IAAW,cAAc,IAAI,MAAM,CAEnC;IAED,IAAW,cAAc,CAAC,KAAK,EAAE,MAAM,EAEtC;IAED;;OAEG;IACI,WAAW,IAAI,IAAI;IAO1B,OAAO,CAAC,YAAY;IAkDpB,OAAO,CAAC,sBAAsB;IAQ9B,OAAO,CAAC,mBAAmB;CAS9B"}
@@ -1,170 +0,0 @@
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.VolumeLimiter = exports.LevelType = void 0;
8
- const live_share_1 = require("@microsoft/live-share");
9
- var LevelType;
10
- (function (LevelType) {
11
- LevelType[LevelType["fixed"] = 0] = "fixed";
12
- LevelType[LevelType["percentage"] = 1] = "percentage";
13
- })(LevelType = exports.LevelType || (exports.LevelType = {}));
14
- class VolumeLimiter {
15
- constructor(player) {
16
- // Settings
17
- this._duration = new live_share_1.TimeInterval(2000);
18
- this._rampDownDuration = new live_share_1.TimeInterval(500);
19
- this._rampUpDuration = new live_share_1.TimeInterval(500);
20
- this._level = 0.1;
21
- this._levelType = LevelType.fixed;
22
- // Running state
23
- this._running = false;
24
- this._endTime = 0;
25
- this._startTime = 0;
26
- this._startVolume = 0;
27
- this._inRamp = false;
28
- this._player = player;
29
- }
30
- /**
31
- * Time, in seconds, that the volume should be lowered.
32
- *
33
- * @remarks
34
- * Applications should periodically call `lowerVolume()` to keep the volume lowered.
35
- */
36
- get duration() {
37
- return this._duration.seconds;
38
- }
39
- set duration(value) {
40
- this._duration.seconds = Math.abs(value);
41
- }
42
- /**
43
- * Target level to lower volume to.
44
- *
45
- * @remarks
46
- * Expressed as a value between 0.0 and 1.0. The value is applied based upon the configured
47
- * `levelType`. The default value is 0.2.
48
- *
49
- * For a level type of `LevelType.fixed` the value is the exact level the volume will be
50
- * lowered to. The default value of 0.2 would cause the volume to be lowered to 0.2.
51
- *
52
- * For a level type of `LevelType.percentage` the value is the percentage by which the volume
53
- * level should be lowered to. The default value of 0.2 would cause the volume to be lowered
54
- * to 20% of its starting value.
55
- */
56
- get level() {
57
- return this._level;
58
- }
59
- set level(value) {
60
- if (value < 0 || value > 1.0) {
61
- throw new Error(`VolumeLimiter: cannot set level to ${value}. Level must be between 0.0 and 1.0.`);
62
- }
63
- this._level = value;
64
- }
65
- /**
66
- * The type of level represented by the `level` property.
67
- */
68
- get levelType() {
69
- return this._levelType;
70
- }
71
- set levelType(value) {
72
- this._levelType = value;
73
- }
74
- /**
75
- * Amount of time, in seconds, it should take to ramp the volume down to the desired level.
76
- */
77
- get rampDownDuration() {
78
- return this._rampDownDuration.seconds;
79
- }
80
- set rampDownDuration(value) {
81
- this._rampDownDuration.seconds = Math.abs(value);
82
- }
83
- /**
84
- * Amount of time, in seconds, it should take to ramp the volume back up to the original level.
85
- */
86
- get rampUpDuration() {
87
- return this._rampUpDuration.seconds;
88
- }
89
- set rampUpDuration(value) {
90
- this._rampUpDuration.seconds = Math.abs(value);
91
- }
92
- /**
93
- * Temporarily lowers an audio sources volume.
94
- */
95
- lowerVolume() {
96
- this._endTime = new Date().getTime() + this._duration.milliseconds;
97
- if (!this._running) {
98
- this.startLimiter();
99
- }
100
- }
101
- startLimiter() {
102
- const adjustVolume = () => {
103
- const now = new Date().getTime();
104
- if (now < this._endTime) {
105
- // Make no adjustment if muted
106
- if (!this._player.muted) {
107
- // Compute adjusted volume level
108
- let volume;
109
- const targetVolume = this.computeTargetVolume();
110
- const rampRange = this._startVolume - targetVolume;
111
- const rampUpStart = this._endTime - this._rampUpDuration.milliseconds;
112
- const rampDownEnd = this._startTime + this._rampDownDuration.milliseconds;
113
- if (now > rampUpStart) {
114
- // We're about to end so ramping up
115
- const progress = (now - rampUpStart) / this._rampUpDuration.milliseconds;
116
- volume = targetVolume + (rampRange * progress);
117
- this._player.volume = volume;
118
- this._inRamp = true;
119
- }
120
- else if (now < rampDownEnd) {
121
- // We just begun so ramping down
122
- const remaining = (rampDownEnd - now) / this._rampUpDuration.milliseconds;
123
- volume = targetVolume + (rampRange * remaining);
124
- this._player.volume = volume;
125
- this._inRamp = true;
126
- }
127
- else if (this._inRamp) {
128
- // We're at the end of a ramp
129
- volume = targetVolume;
130
- this._player.volume = volume;
131
- this._inRamp = false;
132
- }
133
- }
134
- // Schedule next animation frame
135
- this.scheduleAnimationFrame(adjustVolume);
136
- }
137
- else {
138
- // Reset volume to original level
139
- this._player.volume = this._startVolume;
140
- this._running = false;
141
- this._endTime = 0;
142
- this._startTime = 0;
143
- this._startVolume = 0;
144
- }
145
- };
146
- this._running = true;
147
- this._startTime = new Date().getTime();
148
- this._startVolume = this._player.volume;
149
- this.scheduleAnimationFrame(adjustVolume);
150
- }
151
- scheduleAnimationFrame(callback) {
152
- if (requestAnimationFrame) {
153
- requestAnimationFrame(callback);
154
- }
155
- else {
156
- setTimeout(callback, 20);
157
- }
158
- }
159
- computeTargetVolume() {
160
- switch (this._levelType) {
161
- case LevelType.percentage:
162
- return this._startVolume * this._level;
163
- case LevelType.fixed:
164
- default:
165
- return this._level;
166
- }
167
- }
168
- }
169
- exports.VolumeLimiter = VolumeLimiter;
170
- //# sourceMappingURL=VolumeLimiter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VolumeLimiter.js","sourceRoot":"","sources":["../src/VolumeLimiter.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEF,sDAAqD;AAGtD,IAAY,SAA+B;AAA3C,WAAY,SAAS;IAAG,2CAAK,CAAA;IAAE,qDAAU,CAAA;AAAC,CAAC,EAA/B,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAAsB;AAE3C,MAAa,aAAa;IAiBtB,YAAY,MAAoB;QAdhC,WAAW;QACM,cAAS,GAAG,IAAI,yBAAY,CAAC,IAAI,CAAC,CAAC;QACnC,sBAAiB,GAAG,IAAI,yBAAY,CAAC,GAAG,CAAC,CAAC;QAC1C,oBAAe,GAAG,IAAI,yBAAY,CAAC,GAAG,CAAC,CAAC;QACjD,WAAM,GAAW,GAAG,CAAA;QACpB,eAAU,GAAc,SAAS,CAAC,KAAK,CAAC;QAEhD,gBAAgB;QACR,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,CAAC,CAAC;QACb,eAAU,GAAG,CAAC,CAAC;QACf,iBAAY,GAAG,CAAC,CAAC;QACjB,YAAO,GAAG,KAAK,CAAC;QAGpB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED;;;;;OAKG;IACH,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;IAClC,CAAC;IAED,IAAW,QAAQ,CAAC,KAAa;QAC7B,IAAI,CAAC,SAAS,CAAC,OAAO,GAA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