Skip to main content
Skip table of contents

Adaptive buffering goal

The SDK provides an option to start the DASH playback with a less resilient buffer for a quicker zap time and then to stabilise on a more resilient buffer after a short time.

The adaptiveBufferingGoal flag is provided in the source object for the App to mark as either true or false (default if omitted) to enable or disable this feature at each stream level when the source object is set to the player to start playback. When this flag is true, the buffering goal is set low and after 5 seconds of playback will return to a higher level to maintain resilience to network fluctuations.

A more granular configurable API can alternatively be used to the flag. This allows the buffering goal values to be fine tuned as well as the length of delay before the second value is set.

See https://nagra-dtv.atlassian.net/wiki/spaces/CPSBRO5DOC/pages/edit-v2/1341686513#Example-2%3A-using-zappingConfig

When this feature is used, there is no need to additionally set the streaming.bufferingGoal attribute in your configuration.

Example 1: using simple Boolean attribute: adaptiveBufferingGoal

JS
window.changeStreamClicked = function () {
    var source = {
        src: "https://livesim.dashif.org/livesim-chunked/testpic4_8s/Manifest.mpd",
        type: "application/dash+xml",
        adaptiveBufferingGoal: true
    };
    window.player.src(source);
};

Example 2: using more complex/fine tuning attributes: zappingConfig

JS
window.changeStreamClicked = function () {
    var source = {
        src: "https://livesim.dashif.org/livesim-chunked/testpic4_8s/Manifest.mpd",
        type: "application/dash+xml",
        zappingConfig: {
          configBefore: {
            streaming: {
              bufferingGoal: 2,
            }
          },
          configAfter: {
            streaming: {
              bufferingGoal: 12,
            }
          },
          configDelay: 3000, // milliseconds
        }
    };
    window.player.src(source);
};

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.