Skip to content

Commit

Permalink
introduce HLSSettings.minBufferLengthCapping
Browse files Browse the repository at this point in the history
minimum buffer length capping value (max value) if minBufferLength is set to -1
  • Loading branch information
mangui committed Sep 28, 2015
1 parent 053f713 commit 0f5aa7b
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ The plugin accepts several **optional** configuration options, such as:
- `hls_debug2` (default false) - Toggle _verbose debug_ traces, outputted on JS console
- `hls_minbufferlength` (default -1) - Minimum buffer length in _seconds_ that needs to be reached before playback can start (after seeking) or restart (in case of empty buffer)
- If set to `-1` some heuristics based on past metrics are used to define an accurate value that should prevent buffer to stall
- `minBufferLengthCapping` (default -1) - minimum buffer length capping value (max value) if minBufferLength is set to -1
- `hls_lowbufferlength` (default 3) - Low buffer threshold in _seconds_. When crossing down this threshold, HLS will switch to buffering state, usually the player will report this buffering state through a rotating icon. Playback will still continue.
- `hls_maxbufferlength` (default 300) - Maximum buffer length in _seconds_ (0 means infinite buffering)
- `hls_maxbackbufferlength` (default 30) - Maximum back buffer length in _seconds_ (0 means infinite back buffering). back buffer is seekable without redownloading segments.
Expand Down
Binary file modified bin/debug/flashls.swc
Binary file not shown.
Binary file modified bin/debug/flashlsChromeless.swf
Binary file not shown.
Binary file modified bin/debug/flashlsFlowPlayer.swf
Binary file not shown.
Binary file modified bin/debug/flashlsOSMF.swc
Binary file not shown.
Binary file modified bin/debug/flashlsOSMF.swf
Binary file not shown.
Binary file modified bin/release/flashls.swc
Binary file not shown.
Binary file modified bin/release/flashlsChromeless.swf
Binary file not shown.
Binary file modified bin/release/flashlsFlowPlayer.swf
Binary file not shown.
Binary file modified bin/release/flashlsOSMF.swc
Binary file not shown.
Binary file modified bin/release/flashlsOSMF.swf
Binary file not shown.
11 changes: 11 additions & 0 deletions src/org/mangui/hls/HLSSettings.as
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ package org.mangui.hls {
*/
public static var minBufferLength : Number = -1;


/**
* minBufferLengthCapping
*
* Defines minimum buffer length capping value (max value) if minBufferLength is set to -1
*
* Default is -1 = no capping
*/
public static var minBufferLengthCapping : Number = -1;


/**
* maxBufferLength
*
Expand Down
6 changes: 6 additions & 0 deletions src/org/mangui/hls/controller/BufferThresholdController.as
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ package org.mangui.hls.controller {
if (HLSSettings.maxBufferLength) {
_minBufferLength = Math.min(HLSSettings.maxBufferLength, _minBufferLength);
}

// avoid _minBufferLength > minBufferLengthCapping
if (HLSSettings.minBufferLengthCapping > 0) {
_minBufferLength = Math.min(HLSSettings.minBufferLengthCapping, _minBufferLength);
}

CONFIG::LOGGING {
Log.debug2("AutoBufferController:minBufferLength:" + _minBufferLength);
}
Expand Down

0 comments on commit 0f5aa7b

Please sign in to comment.