Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 1.08 KB

setMaxVideoBufferSize.md

File metadata and controls

39 lines (27 loc) · 1.08 KB

setMaxVideoBufferSize

Description

Set the maximum memory the video buffer can take up in the memory, in kilobytes Defaults at Infinity

Once this value is reached, the player won't try to download new video segments anymore.

This feature was designed with devices that have limited memory and trying to play very high bitrates representations in minds.

However on some custom targets, or just to better control the memory footprint of the player, you might want to set this limit.

You can set it to Infinity to remove this limit and just let the browser do this job instead.

The limit set by `setMaxVideoBufferSize` is approximative, and bypassed in edge case scenarios if we dont have enough buffer because of this limitation.
In DirectFile mode (see loadVideo options), this method has no effect.

Syntax

player.setMaxVideoBufferSize(bufferSize);
  • arguments:

    1. bufferSize number: Maximum amount of memory the buffer can download, in kilobytes