Skip to content

Commit

Permalink
fix(FEC-8313): When playing audio entry playbackType is not "vod" (#15)
Browse files Browse the repository at this point in the history
change logic of in _getPlaybackType
  • Loading branch information
Dan Ziv authored Jun 14, 2018
1 parent 8afa119 commit 9f70dc6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/kava.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,16 +388,16 @@ export default class Kava extends BasePlugin {
}

_getPlaybackType(): string {
if (this.player.isLive() && this.player.isDvr()) {
const distanceFromLiveEdge = this.player.duration - this.player.currentTime;
if (distanceFromLiveEdge >= this.config.dvrThreshold) {
return 'dvr';
if (this.player.isLive()) {
if (this.player.isDvr()) {
const distanceFromLiveEdge = this.player.duration - this.player.currentTime;
if (distanceFromLiveEdge >= this.config.dvrThreshold) {
return 'dvr';
}
}
return 'live';
}
if (this.player.config.sources.type) {
return this.player.config.sources.type.toString().toLowerCase();
}
return '';
return 'vod';
}

_validate(): boolean {
Expand Down

0 comments on commit 9f70dc6

Please sign in to comment.