Skip to content

Commit 1672694

Browse files
authored
fix: Improve scalable buffering behaviour (Dash-Industry-Forum#4908)
* fix: Improve scalable buffering behaviour dash.js has two default settings for buffering: bufferTimeAtTopQuality: 30, bufferTimeDefault: 18, All representations will be buffered 18 seconds ahead. Top (highest pixels per second) representation will be buffered 30 seconds ahead. Say we are playing back 1080p (ie. top quality representation), then in scalable mode we have two StreamProcessors running (video and enhancement). The StreamProcessor=enhancement is considered as top quality and buffered 30 seconds ahead. The StreamProcessor=video is not considered as top quality (even though we are playing back the top quality) and buffered only 18 seconds ahead. This PR aims to streamline the buffering behaviour, so when the top quality is being played back (e.g. 1080p scalable), both representations (enhancement and video) are buffered the same amount of time as bufferTimeAtTopQuality. * Only apply logic if enhancement is enabled
1 parent 4f81206 commit 1672694

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/streaming/controllers/ScheduleController.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,9 @@ function ScheduleController(config) {
326326
*/
327327
function _getGenericBufferTarget() {
328328
try {
329-
const currentRepresentation = representationController.getCurrentRepresentation();
329+
const currentRepresentation = (settings.get().streaming.enhancement.enabled) ?
330+
representationController.getCurrentCompositeRepresentation() :
331+
representationController.getCurrentRepresentation();
330332
const streamInfo = currentRepresentation.mediaInfo.streamInfo;
331333
if (abrController.isPlayingAtTopQuality(currentRepresentation)) {
332334
const isLongFormContent = streamInfo.manifestInfo.duration >= settings.get().streaming.buffer.longFormContentDurationThreshold;

0 commit comments

Comments
 (0)