/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the Microsoft Live Share SDK License. */ import { IRuntimeSignaler, TimeInterval, LiveShareRuntime } from "@microsoft/live-share"; import { GroupTransportState } from "./GroupTransportState"; import { CoordinationWaitPoint, ExtendedMediaSessionPlaybackState } from "../MediaSessionExtensions"; import { GroupPlaybackRate } from "./GroupPlaybackRate"; /** * Per client position * @hidden */ export interface ICurrentPlaybackPosition { playbackState: ExtendedMediaSessionPlaybackState; waitPoint?: CoordinationWaitPoint; position: number; duration?: number; timestamp: number; clientId: string; } /** * @hidden */ export declare class GroupPlaybackPosition { private _transportState; private _playbackRate; private _runtime; private _liveRuntime; private _updateInterval; private _positions; constructor(transportState: GroupTransportState, playbackRate: GroupPlaybackRate, runtime: IRuntimeSignaler, liveRuntime: LiveShareRuntime, updateInterval: TimeInterval); /** * Returns the latest position info for the local client. */ get localPosition(): ICurrentPlaybackPosition | undefined; /** * Returns the total number of clients actively being tracked. */ get totalClients(): number; /** * Returns true if all clients being tracked are reporting that they have * either ended or haven't started. */ get trackEnded(): boolean; /** * Returns the number of clients we're waiting for before we can stop waiting. */ get clientsWaiting(): number; /** * Returns the max playback position relative to the start position. * * @remarks * This is called when calculating the current seekTo position. */ get maxPosition(): number; /** * Optional media duration if known. */ mediaDuration?: number; get targetPosition(): number; /** * Enumerates every reported playback position. * @param callbackFn Function applied to each position, */ forEach(callbackFn: (position: ICurrentPlaybackPosition, projectedPosition: number) => void): void; UpdatePlaybackPosition(position: ICurrentPlaybackPosition): void; private getMostProgressedPosition; private limitProjectedPosition; } //# sourceMappingURL=GroupPlaybackPosition.d.ts.map