Skip to content

Commit

Permalink
Update typings for DashHandler (Dash-Industry-Forum#4616)
Browse files Browse the repository at this point in the history
* Update typings for DashHandler
  • Loading branch information
bbert authored Nov 6, 2024
1 parent b1fab66 commit 08e5e00
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 08e5e00

Please sign in to comment.