Skip to content

Commit

Permalink
chore(dashviewer): change video end metric to lag ratio (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
ConradJChan committed Sep 18, 2019
1 parent ed492c1 commit 9baf0b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/viewers/media/DashViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class DashViewer extends VideoBaseViewer {
this.metrics[MEDIA_METRIC.duration] = this.mediaEl ? this.mediaEl.duration * 1000 : 0;
this.metrics[MEDIA_METRIC.watchLength] = watchLength;

this.emitMetric(MEDIA_METRIC_EVENTS.endPlayback, { ...this.metrics });
this.emitMetric(MEDIA_METRIC_EVENTS.endPlayback, this.metrics[MEDIA_METRIC.lagRatio]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/lib/viewers/media/__tests__/DashViewer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@ describe('lib/viewers/media/DashViewer', () => {

dash.processMetrics();

expect(dash.emitMetric).to.have.been.called;
expect(dash.emitMetric).to.have.been.calledWith('media_metric_end_playback', 100);
expect(dash.metrics).to.be.eql(expMetrics);
});
});
Expand Down

0 comments on commit 9baf0b2

Please sign in to comment.