diff --git a/index.d.ts b/index.d.ts index c911eef28f..02782f16c4 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1010,7 +1010,7 @@ declare namespace dashjs { getPatchLocation(manifest: object): PatchLocation[]; - getPeriodbyId(id: string): object | null; + getPeriodById(id: string): Period | null; getProducerReferenceTime(streamInfo: StreamInfo, mediaInfo: MediaInfo): object | []; @@ -2689,8 +2689,10 @@ declare namespace dashjs { } export interface ICurrentRepresentationSwitch { - mt: Date; + mt: number; t: Date; + to: string; + lto: string; } export interface IBufferState { diff --git a/samples/advanced/monitoring.html b/samples/advanced/monitoring.html index b2f2687d9b..c119710e19 100644 --- a/samples/advanced/monitoring.html +++ b/samples/advanced/monitoring.html @@ -45,8 +45,8 @@ if (dashMetrics && streamInfo) { const periodIdx = streamInfo.index; - var repSwitch = dashMetrics.getCurrentRepresentationSwitch('video', true); - var bufferLevel = dashMetrics.getCurrentBufferLevel('video', true); + var repSwitch = dashMetrics.getCurrentRepresentationSwitch('video'); + var bufferLevel = dashMetrics.getCurrentBufferLevel('video'); var bitrate = repSwitch ? Math.round(dashAdapter.getBandwidthForRepresentation(repSwitch.to, periodIdx) / 1000) : NaN; var currentRep = player.getCurrentRepresentationForType('video'); var frameRate = currentRep.frameRate;