Skip to content

Commit

Permalink
Fix typings and monitoring demo
Browse files Browse the repository at this point in the history
  • Loading branch information
dsilhavy committed Jan 13, 2025
1 parent c4c2da9 commit 3720d45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 | [];

Expand Down Expand Up @@ -2689,8 +2689,10 @@ declare namespace dashjs {
}

export interface ICurrentRepresentationSwitch {
mt: Date;
mt: number;
t: Date;
to: string;
lto: string;
}

export interface IBufferState {
Expand Down
4 changes: 2 additions & 2 deletions samples/advanced/monitoring.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3720d45

Please sign in to comment.