Skip to content

Commit

Permalink
feat(FEC-8975): QoS Data enhancment (#74)
Browse files Browse the repository at this point in the history
calculate target buffer for live and vod:

take into account edge cases where:
1. remaining buffer is smaller then defined one for vod
2. buffer is switched from live edge to dvr
  • Loading branch information
RoyBregman authored and Yuvalke committed Jun 17, 2019
1 parent baeb140 commit 6fa818b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dash-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -900,13 +900,13 @@ export default class DashAdapter extends BaseMediaSourceAdapter {
this._shaka.getManifest().presentationTimeline.getSegmentAvailabilityEnd() -
this._shaka.getManifest().presentationTimeline.getSeekRangeEnd() -
(this._videoElement.currentTime - this._getLiveEdge());
targetBufferVal = Math.min(targetBufferVal, this._shaka.getConfiguration().streaming.bufferingGoal);
}
} else {
if (this._shaka.getConfiguration() && this._shaka.getConfiguration().streaming) {
targetBufferVal = this._shaka.getConfiguration().streaming.bufferingGoal;
}
// consideration of the end of the playback in the target buffer calc
targetBufferVal = this._videoElement.duration - this._videoElement.currentTime;
}

targetBufferVal = Math.min(targetBufferVal, this._shaka.getConfiguration().streaming.bufferingGoal);
return targetBufferVal;
}
}

0 comments on commit 6fa818b

Please sign in to comment.