@microsoft/live-share-media 2.0.0-internal.7 → 2.0.0-internal.8
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.
- package/bin/cjs/LiveMediaSessionCoordinator.d.ts +38 -7
- package/bin/cjs/LiveMediaSessionCoordinator.d.ts.map +1 -1
- package/bin/cjs/LiveMediaSessionCoordinator.js +90 -9
- package/bin/cjs/LiveMediaSessionCoordinator.js.map +1 -1
- package/bin/cjs/internals/GroupCoordinatorState.d.ts +2 -1
- package/bin/cjs/internals/GroupCoordinatorState.d.ts.map +1 -1
- package/bin/cjs/internals/GroupCoordinatorState.js.map +1 -1
- package/bin/cjs/internals/GroupPlaybackPosition.d.ts +2 -2
- package/bin/cjs/internals/GroupPlaybackPosition.d.ts.map +1 -1
- package/bin/cjs/internals/GroupPlaybackPosition.js +1 -1
- package/bin/cjs/internals/GroupPlaybackPosition.js.map +1 -1
- package/bin/esm/LiveMediaSessionCoordinator.d.ts +38 -7
- package/bin/esm/LiveMediaSessionCoordinator.d.ts.map +1 -1
- package/bin/esm/LiveMediaSessionCoordinator.js +91 -10
- package/bin/esm/LiveMediaSessionCoordinator.js.map +1 -1
- package/bin/esm/internals/GroupCoordinatorState.d.ts +2 -1
- package/bin/esm/internals/GroupCoordinatorState.d.ts.map +1 -1
- package/bin/esm/internals/GroupCoordinatorState.js.map +1 -1
- package/bin/esm/internals/GroupPlaybackPosition.d.ts +2 -2
- package/bin/esm/internals/GroupPlaybackPosition.d.ts.map +1 -1
- package/bin/esm/internals/GroupPlaybackPosition.js +1 -1
- package/bin/esm/internals/GroupPlaybackPosition.js.map +1 -1
- package/package.json +3 -3
- package/src/LiveMediaSessionCoordinator.ts +96 -10
- package/src/internals/GroupCoordinatorState.ts +2 -1
- package/src/internals/GroupPlaybackPosition.ts +4 -4
- package/src/internals/PriorityTimeInterval.ts +76 -0
- package/.mocharc.cjs +0 -12
- package/.nycrc.json +0 -11
- package/bin/test/IMediaPlayer.d.ts +0 -21
- package/bin/test/IMediaPlayer.d.ts.map +0 -1
- package/bin/test/IMediaPlayer.js +0 -7
- package/bin/test/IMediaPlayer.js.map +0 -1
- package/bin/test/LiveMediaSession.d.ts +0 -97
- package/bin/test/LiveMediaSession.d.ts.map +0 -1
- package/bin/test/LiveMediaSession.js +0 -261
- package/bin/test/LiveMediaSession.js.map +0 -1
- package/bin/test/LiveMediaSessionCoordinator.d.ts +0 -296
- package/bin/test/LiveMediaSessionCoordinator.d.ts.map +0 -1
- package/bin/test/LiveMediaSessionCoordinator.js +0 -552
- package/bin/test/LiveMediaSessionCoordinator.js.map +0 -1
- package/bin/test/LiveMediaSessionCoordinatorSuspension.d.ts +0 -20
- package/bin/test/LiveMediaSessionCoordinatorSuspension.d.ts.map +0 -1
- package/bin/test/LiveMediaSessionCoordinatorSuspension.js +0 -28
- package/bin/test/LiveMediaSessionCoordinatorSuspension.js.map +0 -1
- package/bin/test/MediaPlayerSynchronizer.d.ts +0 -204
- package/bin/test/MediaPlayerSynchronizer.d.ts.map +0 -1
- package/bin/test/MediaPlayerSynchronizer.js +0 -574
- package/bin/test/MediaPlayerSynchronizer.js.map +0 -1
- package/bin/test/MediaSessionActionThrottler.d.ts +0 -12
- package/bin/test/MediaSessionActionThrottler.d.ts.map +0 -1
- package/bin/test/MediaSessionActionThrottler.js +0 -14
- package/bin/test/MediaSessionActionThrottler.js.map +0 -1
- package/bin/test/MediaSessionExtensions.d.ts +0 -177
- package/bin/test/MediaSessionExtensions.d.ts.map +0 -1
- package/bin/test/MediaSessionExtensions.js +0 -26
- package/bin/test/MediaSessionExtensions.js.map +0 -1
- package/bin/test/RepeatedActionThrottler.d.ts +0 -20
- package/bin/test/RepeatedActionThrottler.d.ts.map +0 -1
- package/bin/test/RepeatedActionThrottler.js +0 -63
- package/bin/test/RepeatedActionThrottler.js.map +0 -1
- package/bin/test/VolumeManager.d.ts +0 -84
- package/bin/test/VolumeManager.d.ts.map +0 -1
- package/bin/test/VolumeManager.js +0 -175
- package/bin/test/VolumeManager.js.map +0 -1
- package/bin/test/index.d.ts +0 -14
- package/bin/test/index.d.ts.map +0 -1
- package/bin/test/index.js +0 -30
- package/bin/test/index.js.map +0 -1
- package/bin/test/internals/GroupCoordinatorState.d.ts +0 -110
- package/bin/test/internals/GroupCoordinatorState.d.ts.map +0 -1
- package/bin/test/internals/GroupCoordinatorState.js +0 -516
- package/bin/test/internals/GroupCoordinatorState.js.map +0 -1
- package/bin/test/internals/GroupPlaybackPosition.d.ts +0 -71
- package/bin/test/internals/GroupPlaybackPosition.d.ts.map +0 -1
- package/bin/test/internals/GroupPlaybackPosition.js +0 -170
- package/bin/test/internals/GroupPlaybackPosition.js.map +0 -1
- package/bin/test/internals/GroupPlaybackRate.d.ts +0 -38
- package/bin/test/internals/GroupPlaybackRate.d.ts.map +0 -1
- package/bin/test/internals/GroupPlaybackRate.js +0 -59
- package/bin/test/internals/GroupPlaybackRate.js.map +0 -1
- package/bin/test/internals/GroupPlaybackTrack.d.ts +0 -45
- package/bin/test/internals/GroupPlaybackTrack.d.ts.map +0 -1
- package/bin/test/internals/GroupPlaybackTrack.js +0 -122
- package/bin/test/internals/GroupPlaybackTrack.js.map +0 -1
- package/bin/test/internals/GroupPlaybackTrackData.d.ts +0 -40
- package/bin/test/internals/GroupPlaybackTrackData.d.ts.map +0 -1
- package/bin/test/internals/GroupPlaybackTrackData.js +0 -70
- package/bin/test/internals/GroupPlaybackTrackData.js.map +0 -1
- package/bin/test/internals/GroupTransportState.d.ts +0 -52
- package/bin/test/internals/GroupTransportState.d.ts.map +0 -1
- package/bin/test/internals/GroupTransportState.js +0 -120
- package/bin/test/internals/GroupTransportState.js.map +0 -1
- package/bin/test/internals/PriorityTimeInterval.d.ts +0 -33
- package/bin/test/internals/PriorityTimeInterval.d.ts.map +0 -1
- package/bin/test/internals/PriorityTimeInterval.js +0 -45
- package/bin/test/internals/PriorityTimeInterval.js.map +0 -1
- package/bin/test/internals/consts.d.ts +0 -83
- package/bin/test/internals/consts.d.ts.map +0 -1
- package/bin/test/internals/consts.js +0 -92
- package/bin/test/internals/consts.js.map +0 -1
- package/bin/test/internals/errors.d.ts +0 -17
- package/bin/test/internals/errors.d.ts.map +0 -1
- package/bin/test/internals/errors.js +0 -34
- package/bin/test/internals/errors.js.map +0 -1
- package/bin/test/internals/interfaces.d.ts +0 -23
- package/bin/test/internals/interfaces.d.ts.map +0 -1
- package/bin/test/internals/interfaces.js +0 -3
- package/bin/test/internals/interfaces.js.map +0 -1
- package/bin/test/package.json +0 -1
- package/bin/test/test/GroupPlaybackPosition.spec.d.ts +0 -6
- package/bin/test/test/GroupPlaybackPosition.spec.d.ts.map +0 -1
- package/bin/test/test/GroupPlaybackPosition.spec.js +0 -315
- package/bin/test/test/GroupPlaybackPosition.spec.js.map +0 -1
- package/bin/test/test/GroupPlaybackRate.spec.d.ts +0 -6
- package/bin/test/test/GroupPlaybackRate.spec.d.ts.map +0 -1
- package/bin/test/test/GroupPlaybackRate.spec.js +0 -47
- package/bin/test/test/GroupPlaybackRate.spec.js.map +0 -1
- package/bin/test/test/GroupPlaybackTrack.spec.d.ts +0 -6
- package/bin/test/test/GroupPlaybackTrack.spec.d.ts.map +0 -1
- package/bin/test/test/GroupPlaybackTrack.spec.js +0 -171
- package/bin/test/test/GroupPlaybackTrack.spec.js.map +0 -1
- package/bin/test/test/GroupPlaybackTrackData.spec.d.ts +0 -6
- package/bin/test/test/GroupPlaybackTrackData.spec.d.ts.map +0 -1
- package/bin/test/test/GroupPlaybackTrackData.spec.js +0 -63
- package/bin/test/test/GroupPlaybackTrackData.spec.js.map +0 -1
- package/bin/test/test/LiveMediaSession_ManualActionHandler.spec.d.ts +0 -6
- package/bin/test/test/LiveMediaSession_ManualActionHandler.spec.d.ts.map +0 -1
- package/bin/test/test/LiveMediaSession_ManualActionHandler.spec.js +0 -324
- package/bin/test/test/LiveMediaSession_ManualActionHandler.spec.js.map +0 -1
- package/bin/test/test/LiveMediaSession_Synchronizer.spec.d.ts +0 -6
- package/bin/test/test/LiveMediaSession_Synchronizer.spec.d.ts.map +0 -1
- package/bin/test/test/LiveMediaSession_Synchronizer.spec.js +0 -669
- package/bin/test/test/LiveMediaSession_Synchronizer.spec.js.map +0 -1
- package/bin/test/test/PriorityTimeInterval.spec.d.ts +0 -6
- package/bin/test/test/PriorityTimeInterval.spec.d.ts.map +0 -1
- package/bin/test/test/PriorityTimeInterval.spec.js +0 -67
- package/bin/test/test/PriorityTimeInterval.spec.js.map +0 -1
- package/bin/test/test/TestUtils.d.ts +0 -44
- package/bin/test/test/TestUtils.d.ts.map +0 -1
- package/bin/test/test/TestUtils.js +0 -116
- package/bin/test/test/TestUtils.js.map +0 -1
- package/bin/test/test/VolumeManager.spec.d.ts +0 -2
- package/bin/test/test/VolumeManager.spec.d.ts.map +0 -1
- package/bin/test/test/VolumeManager.spec.js +0 -163
- package/bin/test/test/VolumeManager.spec.js.map +0 -1
- package/nyc/junit-report.json +0 -930
- package/nyc/junit-report.xml +0 -59
- package/tsconfig.test.json +0 -9
- package/typedoc.json +0 -10
|
@@ -53,6 +53,7 @@ import {
|
|
|
53
53
|
} from "./GroupPlaybackRate.js";
|
|
54
54
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
55
55
|
import { IGenericTypedEvents } from "./interfaces.js";
|
|
56
|
+
import { PriorityTimeInterval } from "./PriorityTimeInterval.js";
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
59
|
* @hidden
|
|
@@ -145,7 +146,7 @@ export class GroupCoordinatorState extends TypedEventEmitter<IGenericTypedEvents
|
|
|
145
146
|
runtime: IRuntimeSignaler,
|
|
146
147
|
liveRuntime: LiveShareRuntime,
|
|
147
148
|
maxPlaybackDrift: TimeInterval,
|
|
148
|
-
positionUpdateInterval:
|
|
149
|
+
positionUpdateInterval: PriorityTimeInterval,
|
|
149
150
|
getMediaPlayerState: () => IMediaPlayerState
|
|
150
151
|
) {
|
|
151
152
|
super();
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Licensed under the Microsoft Live Share SDK License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { TimeInterval } from "@microsoft/live-share";
|
|
7
6
|
import {
|
|
8
7
|
IRuntimeSignaler,
|
|
9
8
|
LiveShareRuntime,
|
|
@@ -15,6 +14,7 @@ import {
|
|
|
15
14
|
ExtendedMediaSessionPlaybackState,
|
|
16
15
|
} from "../MediaSessionExtensions.js";
|
|
17
16
|
import { GroupPlaybackRate } from "./GroupPlaybackRate.js";
|
|
17
|
+
import { PriorityTimeInterval } from "./PriorityTimeInterval.js";
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Per client position
|
|
@@ -37,7 +37,7 @@ export class GroupPlaybackPosition {
|
|
|
37
37
|
private _playbackRate: GroupPlaybackRate;
|
|
38
38
|
private _runtime: IRuntimeSignaler;
|
|
39
39
|
private _liveRuntime: LiveShareRuntime;
|
|
40
|
-
private _updateInterval:
|
|
40
|
+
private _updateInterval: PriorityTimeInterval;
|
|
41
41
|
private _positions: Map<string, ICurrentPlaybackPosition>;
|
|
42
42
|
|
|
43
43
|
constructor(
|
|
@@ -45,7 +45,7 @@ export class GroupPlaybackPosition {
|
|
|
45
45
|
playbackRate: GroupPlaybackRate,
|
|
46
46
|
runtime: IRuntimeSignaler,
|
|
47
47
|
liveRuntime: LiveShareRuntime,
|
|
48
|
-
updateInterval:
|
|
48
|
+
updateInterval: PriorityTimeInterval
|
|
49
49
|
) {
|
|
50
50
|
this._transportState = transportState;
|
|
51
51
|
this._playbackRate = playbackRate;
|
|
@@ -171,7 +171,7 @@ export class GroupPlaybackPosition {
|
|
|
171
171
|
) => void
|
|
172
172
|
): void {
|
|
173
173
|
const now = this._liveRuntime.getTimestamp();
|
|
174
|
-
const ignoreBefore = now - this._updateInterval.
|
|
174
|
+
const ignoreBefore = now - this._updateInterval.maxMilliseconds * 2;
|
|
175
175
|
const shouldProject = !this._transportState.track.metadata?.liveStream;
|
|
176
176
|
this._positions.forEach((position, _) => {
|
|
177
177
|
// Ignore any old updates
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { TimeInterval } from "@microsoft/live-share";
|
|
2
|
+
|
|
3
|
+
function getScaledPriorityTimeMs(
|
|
4
|
+
minMilliseconds: number,
|
|
5
|
+
hasPriority: boolean,
|
|
6
|
+
shouldPrioritize: boolean,
|
|
7
|
+
scaleBy: number
|
|
8
|
+
): number {
|
|
9
|
+
if (!shouldPrioritize) return minMilliseconds;
|
|
10
|
+
if (hasPriority) return minMilliseconds;
|
|
11
|
+
return minMilliseconds * scaleBy;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @hidden
|
|
16
|
+
* Time interval that can scale based on a scaling function.
|
|
17
|
+
*/
|
|
18
|
+
export class PriorityTimeInterval extends TimeInterval {
|
|
19
|
+
/**
|
|
20
|
+
* If true, local user has priority and will have the lowest possible millesecond value.
|
|
21
|
+
*/
|
|
22
|
+
public hasPriority: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* If true, milliseconds will be scaled when {@link hasPriority} is false.
|
|
25
|
+
*/
|
|
26
|
+
public shouldPrioritize: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Function to get the scale ratio.
|
|
29
|
+
*/
|
|
30
|
+
private getScaleBy: () => number;
|
|
31
|
+
/**
|
|
32
|
+
* Time interval that can scale based on a scaling function.
|
|
33
|
+
*
|
|
34
|
+
* @param defaultMilliseconds the default minimum milliseconds
|
|
35
|
+
* @param getScaleByFn a function to scale the milliseconds by when {@link hasPriority} is false and {@link shouldPrioritize} is true.
|
|
36
|
+
* @param defaultHasPriority the default {@link hasPriority} value
|
|
37
|
+
* @param defaultShouldPrioritize the default {@link shouldPrioritize} value
|
|
38
|
+
*/
|
|
39
|
+
constructor(
|
|
40
|
+
defaultMilliseconds: number,
|
|
41
|
+
getScaleByFn: () => number,
|
|
42
|
+
defaultHasPriority: boolean = false,
|
|
43
|
+
defaultShouldPrioritize: boolean = true
|
|
44
|
+
) {
|
|
45
|
+
super(defaultMilliseconds);
|
|
46
|
+
this.hasPriority = defaultHasPriority;
|
|
47
|
+
this.shouldPrioritize = defaultShouldPrioritize;
|
|
48
|
+
this.getScaleBy = getScaleByFn;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public get milliseconds(): number {
|
|
52
|
+
return getScaledPriorityTimeMs(
|
|
53
|
+
this._milliseconds,
|
|
54
|
+
this.hasPriority,
|
|
55
|
+
this.shouldPrioritize,
|
|
56
|
+
this.getScaleBy()
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
public set milliseconds(value: number) {
|
|
61
|
+
this._milliseconds = value;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public get minMilliseconds(): number {
|
|
65
|
+
return this._milliseconds;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public get maxMilliseconds(): number {
|
|
69
|
+
return getScaledPriorityTimeMs(
|
|
70
|
+
this._milliseconds,
|
|
71
|
+
false,
|
|
72
|
+
this.shouldPrioritize,
|
|
73
|
+
this.getScaleBy()
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
}
|
package/.mocharc.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
-
* Licensed under the Microsoft Live Share SDK License.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
"use strict";
|
|
7
|
-
|
|
8
|
-
const packageDir = `${__dirname}/../..`;
|
|
9
|
-
|
|
10
|
-
const getFluidTestMochaConfig = require("@fluidframework/mocha-test-setup/mocharc-common.js");
|
|
11
|
-
const config = getFluidTestMochaConfig(packageDir);
|
|
12
|
-
module.exports = config;
|
package/.nycrc.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Licensed under the Microsoft Live Share SDK License.
|
|
4
|
-
*/
|
|
5
|
-
export interface IMediaPlayer {
|
|
6
|
-
readonly currentSrc: string;
|
|
7
|
-
currentTime: number;
|
|
8
|
-
readonly duration: number;
|
|
9
|
-
readonly ended: boolean;
|
|
10
|
-
muted: boolean;
|
|
11
|
-
readonly paused: boolean;
|
|
12
|
-
playbackRate: number;
|
|
13
|
-
src: string;
|
|
14
|
-
volume: number;
|
|
15
|
-
load(): void;
|
|
16
|
-
pause(): void;
|
|
17
|
-
play(): Promise<void>;
|
|
18
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
19
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=IMediaPlayer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IMediaPlayer.d.ts","sourceRoot":"","sources":["../../src/IMediaPlayer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,YAAY;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,gBAAgB,CACZ,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kCAAkC,EAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC5C,IAAI,CAAC;IACR,mBAAmB,CACf,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,kCAAkC,EAC5C,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACzC,IAAI,CAAC;CACX"}
|
package/bin/test/IMediaPlayer.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IMediaPlayer.js","sourceRoot":"","sources":["../../src/IMediaPlayer.ts"],"names":[],"mappings":";AAAA;;;GAGG"}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
-
* Licensed under the Microsoft Live Share SDK License.
|
|
4
|
-
*/
|
|
5
|
-
import { DataObjectFactory } from "@fluidframework/aqueduct/internal";
|
|
6
|
-
import { LiveTelemetryLogger, UserMeetingRole } from "@microsoft/live-share";
|
|
7
|
-
import { LiveDataObject } from "@microsoft/live-share/internal";
|
|
8
|
-
import { MediaPlayerSynchronizer } from "./MediaPlayerSynchronizer.js";
|
|
9
|
-
import { ExtendedMediaSessionAction, ExtendedMediaSessionActionHandler } from "./MediaSessionExtensions.js";
|
|
10
|
-
import { LiveMediaSessionCoordinator, IMediaPlayerState } from "./LiveMediaSessionCoordinator.js";
|
|
11
|
-
import { MediaSessionActionThrottler } from "./MediaSessionActionThrottler.js";
|
|
12
|
-
import { IMediaPlayer } from "./IMediaPlayer.js";
|
|
13
|
-
import { SharedObjectKind } from "fluid-framework";
|
|
14
|
-
/**
|
|
15
|
-
* Live fluid object that synchronizes media playback across multiple clients.
|
|
16
|
-
*/
|
|
17
|
-
export declare class LiveMediaSessionClass extends LiveDataObject {
|
|
18
|
-
private _actionThrottler;
|
|
19
|
-
private _logger?;
|
|
20
|
-
private _requestPlayerStateHandler?;
|
|
21
|
-
private _coordinator?;
|
|
22
|
-
private readonly _actionHandlers;
|
|
23
|
-
private _synchronizing?;
|
|
24
|
-
private _updateTimer;
|
|
25
|
-
private _lastUpdateTime;
|
|
26
|
-
/**
|
|
27
|
-
* The objects fluid type name.
|
|
28
|
-
*/
|
|
29
|
-
static readonly TypeName = "@microsoft/fluid-media:SharedMediaSession";
|
|
30
|
-
/**
|
|
31
|
-
* The objects fluid type factory.
|
|
32
|
-
*/
|
|
33
|
-
static readonly factory: DataObjectFactory<LiveMediaSessionClass, import("@fluidframework/aqueduct/internal").DataObjectTypes>;
|
|
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(): MediaSessionActionThrottler;
|
|
48
|
-
set actionThrottler(value: MediaSessionActionThrottler);
|
|
49
|
-
/**
|
|
50
|
-
* The group coordinator for the session.
|
|
51
|
-
*/
|
|
52
|
-
get coordinator(): LiveMediaSessionCoordinator;
|
|
53
|
-
/**
|
|
54
|
-
* Returns the logger used by the session and coordinator.
|
|
55
|
-
*
|
|
56
|
-
* @remarks
|
|
57
|
-
* This is used by the `MediaPlayerSynchronizer` to log events.
|
|
58
|
-
*/
|
|
59
|
-
get logger(): LiveTelemetryLogger;
|
|
60
|
-
/**
|
|
61
|
-
* Initialize the object to begin sending/receiving group playback updates through this DDS.
|
|
62
|
-
*
|
|
63
|
-
* @param allowedRoles Optional. List of roles allowed to group transport operations like play/pause/seek/setTrack.
|
|
64
|
-
*
|
|
65
|
-
* @returns a void promise that resolves once complete.
|
|
66
|
-
*
|
|
67
|
-
* @throws error when `.initialize()` has already been called for this class instance.
|
|
68
|
-
*/
|
|
69
|
-
initialize(allowedRoles?: UserMeetingRole[]): Promise<void>;
|
|
70
|
-
/**
|
|
71
|
-
* Registers an action handler with the session.
|
|
72
|
-
* @param action Name of the action to register a handler for.
|
|
73
|
-
* @param handler Function called when the action is triggered.
|
|
74
|
-
*/
|
|
75
|
-
setActionHandler(action: ExtendedMediaSessionAction, handler: ExtendedMediaSessionActionHandler | MediaSessionActionHandler | null): void;
|
|
76
|
-
/**
|
|
77
|
-
* Registers a handler that will be queried anytime the group coordinate needs to know the
|
|
78
|
-
* local players transport state and position.
|
|
79
|
-
*/
|
|
80
|
-
setRequestPlayerStateHandler(handler: () => IMediaPlayerState): void;
|
|
81
|
-
/**
|
|
82
|
-
* Begins synchronizing the playback of a media element.
|
|
83
|
-
* @param player Something that "looks like" and HTML Media Element.
|
|
84
|
-
* @returns A new synchronizer instance. Call `synchronizer.end()` to stop synchronizing the elements playback.
|
|
85
|
-
*/
|
|
86
|
-
synchronize(player: IMediaPlayer): MediaPlayerSynchronizer;
|
|
87
|
-
protected hasInitialized(): Promise<void>;
|
|
88
|
-
private checkWaitPointHit;
|
|
89
|
-
private getCurrentPlayerState;
|
|
90
|
-
private dispatchAction;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Live fluid object that synchronizes media playback across multiple clients.
|
|
94
|
-
*/
|
|
95
|
-
export type LiveMediaSession = LiveMediaSessionClass;
|
|
96
|
-
export declare const LiveMediaSession: typeof LiveMediaSessionClass & SharedObjectKind<LiveMediaSessionClass>;
|
|
97
|
-
//# sourceMappingURL=LiveMediaSession.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LiveMediaSession.d.ts","sourceRoot":"","sources":["../../src/LiveMediaSession.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,iBAAiB,EAEpB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAGH,mBAAmB,EACnB,eAAe,EA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EACD,iCAAiC,GACjC,yBAAyB,GACzB,IAAI,GACX,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;IAwF/C,OAAO,CAAC,iBAAiB;IAgCzB,OAAO,CAAC,qBAAqB;IAU7B,OAAO,CAAC,cAAc;CAQzB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AAGrD,eAAO,MAAM,gBAAgB,wEAGzB,CAAC"}
|
|
@@ -1,261 +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
|
-
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 = exports.LiveMediaSessionClass = void 0;
|
|
17
|
-
const internal_1 = require("@fluidframework/aqueduct/internal");
|
|
18
|
-
const live_share_1 = require("@microsoft/live-share");
|
|
19
|
-
const internal_2 = require("@microsoft/live-share/internal");
|
|
20
|
-
const MediaPlayerSynchronizer_js_1 = require("./MediaPlayerSynchronizer.js");
|
|
21
|
-
const MediaSessionExtensions_js_1 = require("./MediaSessionExtensions.js");
|
|
22
|
-
const LiveMediaSessionCoordinator_js_1 = require("./LiveMediaSessionCoordinator.js");
|
|
23
|
-
const RepeatedActionThrottler_js_1 = require("./RepeatedActionThrottler.js");
|
|
24
|
-
const consts_js_1 = require("./internals/consts.js");
|
|
25
|
-
/**
|
|
26
|
-
* Live fluid object that synchronizes media playback across multiple clients.
|
|
27
|
-
*/
|
|
28
|
-
class LiveMediaSessionClass extends internal_2.LiveDataObject {
|
|
29
|
-
constructor() {
|
|
30
|
-
super(...arguments);
|
|
31
|
-
this._actionThrottler = new RepeatedActionThrottler_js_1.RepeatedActionThrottler();
|
|
32
|
-
this._actionHandlers = new Map();
|
|
33
|
-
this._lastUpdateTime = 0;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Extension point that lets applications replace the default logic for throttling the sessions
|
|
37
|
-
* local sync behavior.
|
|
38
|
-
*
|
|
39
|
-
* @remarks
|
|
40
|
-
* The `LiveMediaCoordinator` is fairly aggressive at wanting to keep the local media player
|
|
41
|
-
* in sync with the rest of the group. This aggressiveness can result in the coordinator sending
|
|
42
|
-
* new sync actions before the local player has finished responding to the previous sync action.
|
|
43
|
-
* The `ActionThrottler` gives apps fine grain control over how aggressive they want sync to be.
|
|
44
|
-
*
|
|
45
|
-
* By default, a `RepeatedAction` throttler is used which prevents the same sync action from
|
|
46
|
-
* being sent within an adjustable time period.
|
|
47
|
-
*/
|
|
48
|
-
get actionThrottler() {
|
|
49
|
-
return this._actionThrottler;
|
|
50
|
-
}
|
|
51
|
-
set actionThrottler(value) {
|
|
52
|
-
this._actionThrottler = value;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* The group coordinator for the session.
|
|
56
|
-
*/
|
|
57
|
-
get coordinator() {
|
|
58
|
-
return this._coordinator;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Returns the logger used by the session and coordinator.
|
|
62
|
-
*
|
|
63
|
-
* @remarks
|
|
64
|
-
* This is used by the `MediaPlayerSynchronizer` to log events.
|
|
65
|
-
*/
|
|
66
|
-
get logger() {
|
|
67
|
-
return this._logger;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Initialize the object to begin sending/receiving group playback updates through this DDS.
|
|
71
|
-
*
|
|
72
|
-
* @param allowedRoles Optional. List of roles allowed to group transport operations like play/pause/seek/setTrack.
|
|
73
|
-
*
|
|
74
|
-
* @returns a void promise that resolves once complete.
|
|
75
|
-
*
|
|
76
|
-
* @throws error when `.initialize()` has already been called for this class instance.
|
|
77
|
-
*/
|
|
78
|
-
initialize(allowedRoles) {
|
|
79
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
-
live_share_1.LiveDataObjectInitializeNotNeededError.assert("LiveMediaSession:initialize", this.initializeState);
|
|
81
|
-
// Update initialize state as pending
|
|
82
|
-
this.initializeState = live_share_1.LiveDataObjectInitializeState.pending;
|
|
83
|
-
if (allowedRoles) {
|
|
84
|
-
this._allowedRoles = allowedRoles;
|
|
85
|
-
}
|
|
86
|
-
try {
|
|
87
|
-
yield this.coordinator.initialize(allowedRoles);
|
|
88
|
-
}
|
|
89
|
-
catch (error) {
|
|
90
|
-
this.initializeState = live_share_1.LiveDataObjectInitializeState.needed;
|
|
91
|
-
throw error;
|
|
92
|
-
}
|
|
93
|
-
// Update initialize state as succeeded
|
|
94
|
-
this.initializeState = live_share_1.LiveDataObjectInitializeState.succeeded;
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Registers an action handler with the session.
|
|
99
|
-
* @param action Name of the action to register a handler for.
|
|
100
|
-
* @param handler Function called when the action is triggered.
|
|
101
|
-
*/
|
|
102
|
-
setActionHandler(action, handler) {
|
|
103
|
-
if (handler) {
|
|
104
|
-
// add handler
|
|
105
|
-
this._actionHandlers.set(action, handler);
|
|
106
|
-
}
|
|
107
|
-
else if (this._actionHandlers.has(action)) {
|
|
108
|
-
// remove handler
|
|
109
|
-
this._actionHandlers.delete(action);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Registers a handler that will be queried anytime the group coordinate needs to know the
|
|
114
|
-
* local players transport state and position.
|
|
115
|
-
*/
|
|
116
|
-
setRequestPlayerStateHandler(handler) {
|
|
117
|
-
this._requestPlayerStateHandler = handler;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Begins synchronizing the playback of a media element.
|
|
121
|
-
* @param player Something that "looks like" and HTML Media Element.
|
|
122
|
-
* @returns A new synchronizer instance. Call `synchronizer.end()` to stop synchronizing the elements playback.
|
|
123
|
-
*/
|
|
124
|
-
synchronize(player) {
|
|
125
|
-
// A session can only synchronize one player at a time
|
|
126
|
-
if (this._synchronizing) {
|
|
127
|
-
this._synchronizing.end();
|
|
128
|
-
}
|
|
129
|
-
// Start position update timer
|
|
130
|
-
if (!this._updateTimer) {
|
|
131
|
-
this.logger.sendTelemetryEvent(consts_js_1.TelemetryEvents.MediaSession.BeginPositionUpdateTimer);
|
|
132
|
-
this._updateTimer = setInterval(() => {
|
|
133
|
-
// Get current state
|
|
134
|
-
const state = this.getCurrentPlayerState();
|
|
135
|
-
// Check for hit wait point
|
|
136
|
-
this.checkWaitPointHit(state);
|
|
137
|
-
// Send position update if interval hit
|
|
138
|
-
const now = new Date().getTime();
|
|
139
|
-
const delta = (now - this._lastUpdateTime) / 1000;
|
|
140
|
-
if (this.coordinator.isInitialized &&
|
|
141
|
-
delta >= this.coordinator.positionUpdateInterval) {
|
|
142
|
-
this._lastUpdateTime = now;
|
|
143
|
-
this.coordinator.sendPositionUpdate(state);
|
|
144
|
-
}
|
|
145
|
-
}, 500);
|
|
146
|
-
}
|
|
147
|
-
return new MediaPlayerSynchronizer_js_1.MediaPlayerSynchronizer(player, this, this.runtime, () => {
|
|
148
|
-
this._synchronizing = undefined;
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
hasInitialized() {
|
|
152
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
this._logger = new live_share_1.LiveTelemetryLogger(this.runtime, this.liveRuntime);
|
|
154
|
-
// Create coordinator and listen for triggered actions
|
|
155
|
-
this._coordinator = new LiveMediaSessionCoordinator_js_1.LiveMediaSessionCoordinator(this.id, this.runtime, this.liveRuntime, () => this.getCurrentPlayerState());
|
|
156
|
-
this._coordinator.on(MediaSessionExtensions_js_1.MediaSessionCoordinatorEvents.triggeraction, (event) => {
|
|
157
|
-
// Pre-process actions
|
|
158
|
-
const details = event.details;
|
|
159
|
-
const seekTime = typeof details.seekTime == "number" ? details.seekTime : -1;
|
|
160
|
-
switch (details.action) {
|
|
161
|
-
case "play":
|
|
162
|
-
this.logger.sendTelemetryEvent(consts_js_1.TelemetryEvents.MediaSession.PlayAction, null, {
|
|
163
|
-
position: seekTime,
|
|
164
|
-
});
|
|
165
|
-
break;
|
|
166
|
-
case "pause":
|
|
167
|
-
this.logger.sendTelemetryEvent(consts_js_1.TelemetryEvents.MediaSession.PauseAction, null, {
|
|
168
|
-
position: seekTime,
|
|
169
|
-
});
|
|
170
|
-
break;
|
|
171
|
-
case "ratechange":
|
|
172
|
-
if (!details.playbackRate) {
|
|
173
|
-
break;
|
|
174
|
-
}
|
|
175
|
-
this.logger.sendTelemetryEvent(consts_js_1.TelemetryEvents.MediaSession.RateChangeAction, null, {
|
|
176
|
-
playbackRate: details.playbackRate,
|
|
177
|
-
});
|
|
178
|
-
break;
|
|
179
|
-
case "seekto":
|
|
180
|
-
this.logger.sendTelemetryEvent(consts_js_1.TelemetryEvents.MediaSession.SeekToAction, null, {
|
|
181
|
-
position: seekTime,
|
|
182
|
-
});
|
|
183
|
-
break;
|
|
184
|
-
case "settrack":
|
|
185
|
-
this.logger.sendTelemetryEvent(consts_js_1.TelemetryEvents.MediaSession.SetTrackAction);
|
|
186
|
-
break;
|
|
187
|
-
case "datachange":
|
|
188
|
-
this.logger.sendTelemetryEvent(consts_js_1.TelemetryEvents.MediaSession.DataChangeAction);
|
|
189
|
-
break;
|
|
190
|
-
case "catchup":
|
|
191
|
-
// Default to seekto if catchup not implemented
|
|
192
|
-
this.logger.sendTelemetryEvent(consts_js_1.TelemetryEvents.MediaSession.CatchUpAction, null, {
|
|
193
|
-
position: seekTime,
|
|
194
|
-
});
|
|
195
|
-
if (!this._actionHandlers.has("catchup")) {
|
|
196
|
-
details.action = "seekto";
|
|
197
|
-
}
|
|
198
|
-
break;
|
|
199
|
-
}
|
|
200
|
-
// Dispatch action
|
|
201
|
-
this.dispatchAction(details);
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
checkWaitPointHit(state) {
|
|
206
|
-
// Was a wait point hit?
|
|
207
|
-
if (state.positionState && this.coordinator.isInitialized) {
|
|
208
|
-
const waitPoint = this.coordinator.findNextWaitPoint();
|
|
209
|
-
if (waitPoint &&
|
|
210
|
-
state.positionState.position != undefined &&
|
|
211
|
-
state.positionState.position >= waitPoint.position) {
|
|
212
|
-
// Ensure handler registered
|
|
213
|
-
if (!this._actionHandlers.has("wait")) {
|
|
214
|
-
throw new Error(`LiveMediaSession:checkWaitPointHit - wait point hit but no 'wait' action registered.\nTo fix this error, set a \`wait\` action using the \`setActionHandler()\` function.`);
|
|
215
|
-
}
|
|
216
|
-
// Begin suspension for wait point
|
|
217
|
-
this.waitUntilConnected().then((clientId) => {
|
|
218
|
-
const suspension = this.coordinator.beginSuspension(waitPoint);
|
|
219
|
-
this.dispatchAction({
|
|
220
|
-
action: "wait",
|
|
221
|
-
source: "system",
|
|
222
|
-
clientId,
|
|
223
|
-
local: true,
|
|
224
|
-
suspension,
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
getCurrentPlayerState() {
|
|
231
|
-
if (!this._requestPlayerStateHandler) {
|
|
232
|
-
throw new Error("LiveMediaSession:getCurrentPlayerState - no `requestPlayerStateHandler` callback configured.\nTo fix this error, ensure `setRequestPlayerStateHandler()` has been set with a delegate to retrieve your player's state, or use the `synchronize()` function to create a new `MediaPlayerSynchronizer` instance tied to your `IMediaPlayer` instance.");
|
|
233
|
-
}
|
|
234
|
-
return this._requestPlayerStateHandler();
|
|
235
|
-
}
|
|
236
|
-
dispatchAction(details) {
|
|
237
|
-
if (this._actionHandlers.has(details.action)) {
|
|
238
|
-
const handler = this._actionHandlers.get(details.action);
|
|
239
|
-
this._actionThrottler.throttled(details, handler);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
exports.LiveMediaSessionClass = LiveMediaSessionClass;
|
|
244
|
-
/**
|
|
245
|
-
* The objects fluid type name.
|
|
246
|
-
*/
|
|
247
|
-
LiveMediaSessionClass.TypeName = `@microsoft/fluid-media:SharedMediaSession`;
|
|
248
|
-
/**
|
|
249
|
-
* The objects fluid type factory.
|
|
250
|
-
*/
|
|
251
|
-
LiveMediaSessionClass.factory = new internal_1.DataObjectFactory(LiveMediaSessionClass.TypeName, LiveMediaSessionClass, [], {});
|
|
252
|
-
// eslint-disable-next-line no-redeclare
|
|
253
|
-
exports.LiveMediaSession = (() => {
|
|
254
|
-
const kind = (0, internal_1.createDataObjectKind)(LiveMediaSessionClass);
|
|
255
|
-
return kind;
|
|
256
|
-
})();
|
|
257
|
-
/**
|
|
258
|
-
* Register `LiveMediaSession` as an available `SharedObjectKind` for use in dynamic object loading.
|
|
259
|
-
*/
|
|
260
|
-
internal_2.DynamicObjectRegistry.registerObjectClass(exports.LiveMediaSession, exports.LiveMediaSession.TypeName);
|
|
261
|
-
//# sourceMappingURL=LiveMediaSession.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LiveMediaSession.js","sourceRoot":"","sources":["../../src/LiveMediaSession.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;AAEH,gEAG2C;AAC3C,sDAK+B;AAC/B,6DAGwC;AACxC,6EAAuE;AAE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