From 08e5e00bf530686a1eb8ee009c1fdc3de3100e0e Mon Sep 17 00:00:00 2001 From: Bertrand Berthelot Date: Wed, 6 Nov 2024 16:06:24 +0100 Subject: [PATCH] Update typings for DashHandler (#4616) * Update typings for DashHandler --- index.d.ts | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/index.d.ts b/index.d.ts index e79d2af473..b83829a62f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -780,40 +780,31 @@ declare namespace dashjs { } export interface DashHandler { - initialize(isDynamic: boolean): void; - - getStreamId(): string; + getCurrentIndex(): number; - getType(): string; + getInitRequest(mediaInfo: MediaInfo, representation: Representation): FragmentRequest | null; - on(type: AdaptationSetRemovedNoCapabilitiesEvent['type'], listener: (e: AdaptationSetRemovedNoCapabilitiesEvent) => void, scope?: object): void; + getNextSegmentRequest(mediaInfo: MediaInfo, representation: Representation): FragmentRequest | null; - on(type: string, listener: (e: MediaPlayerEvent) => void, scope?: object): void; + getNextSegmentRequestIdempotent(mediaInfo: MediaInfo, representation: Representation): FragmentRequest | null; + getSegmentRequestForTime(mediaInfo: MediaInfo, representation: Representation, time: number): FragmentRequest | null; - off(type: string, listener: (e: any) => void, scope?: object): void; + getStreamId(): string; getStreamInfo(): StreamInfo; - reset(): void; - - getInitRequest(mediaInfo: MediaInfo, representation: Representation): Request | null; - - isLastSegmentRequested(representation: Representation, bufferingTime: number): boolean; + getType(): string; - getSegmentRequestForTime(mediaInfo: MediaInfo, representation: Representation, time: number): Request; + getValidTimeAheadOfTargetTime(time: number, mediaInfo: MediaInfo, representation: Representation, targetThreshold: number): number; - getNextSegmentRequestIdempotent(mediaInfo: MediaInfo, representation: Representation): FragmentRequest | null; + initialize(isDynamic: boolean): void; - getNextSegmentRequest(mediaInfo: MediaInfo, representation: Representation): FragmentRequest | null; + isLastSegmentRequested(representation: Representation, bufferingTime: number): boolean; repeatSegmentRequest(mediaInfo: MediaInfo, representation: Representation): FragmentRequest | null; - getValidTimeCloseToTargetTime(time: number, mediaInfo: MediaInfo, representation: Representation, targetThreshold: number): number; - - getValidTimeAheadOfTargetTime(time: number, mediaInfo: MediaInfo, representation: Representation): number; - - getCurrentIndex(): number; + reset(): void; } export interface DashMetrics {