diff --git a/index.d.ts b/index.d.ts index 63556864b1..381b1b16d0 100644 --- a/index.d.ts +++ b/index.d.ts @@ -359,6 +359,8 @@ declare namespace dashjs { export type CapabilitiesFilter = (representation: Representation) => boolean; + export type TrackSelectionFunction = (tracks: MediaInfo[]) => MediaInfo[]; + export interface MediaPlayerClass { initialize(view?: HTMLElement, source?: string, autoPlay?: boolean): void; @@ -584,6 +586,10 @@ declare namespace dashjs { unregisterCustomCapabilitiesFilter(filter: CapabilitiesFilter): void, + setCustomInitialTrackSelectionFunction(fn: TrackSelectionFunction): void, + + resetCustomInitialTrackSelectionFunction(fn: TrackSelectionFunction): void, + attachTTMLRenderingDiv(div: HTMLDivElement): void; getCurrentTextTrackIndex(): number; diff --git a/src/streaming/controllers/MediaController.js b/src/streaming/controllers/MediaController.js index ad0aabfe2f..43969f557f 100644 --- a/src/streaming/controllers/MediaController.js +++ b/src/streaming/controllers/MediaController.js @@ -286,7 +286,6 @@ function MediaController() { function reset() { tracks = {}; lastSelectedTracks = {}; - customInitialTrackSelectionFunction = null; resetInitialSettings(); }