Viblast Documentation
Configuration Parameters
Configuration parameters can be passed on to Viblast Player in HTML or in JavaScript.
In HTML, each of them has to be prefixed by "data-viblast-", for instance <video data-viblast-chunks-per-hls-entry="4" ...></video>
In JavaScript, they have to be written in camel case, e.g.
viblast(...).setup({
chunksPerHlsEntry: 4,
...
});
Here is a list of all the configuration parameters that can be set on Viblast Player.
Player
- stream (string) : URL of the cdn stream that will be delivered using Viblast
- cdn-stream (string) : a synonym for cdn-stream
- key (string) : License Key
- log (string) : one of error, warning, info, verbose.
- remuxer-log (string): one of error, warning, info, verbose
- forceHEAAC (switch on/off) : Force usage of HE-AAC. Same as he-aac. The default value is
false
. - he-aac (switch on/off) : Force usage of HE-AAC. Same as forceHEAAC.
- abr (switch on/off) : Enables/Disables auto adaptive bitrate support. The default value is
true
; - initial-abr-index (integer) : The index of the sub-playlist to be used as the initial playlist when a variant playlist is provided. The default value is the middle quality variant.
- abr-consider-dimensions (switch on/off) : Take into consideration the current player width and height when choosing the best stream alternative. The default is value
true
. - abr-min-chunk-size-consider-bandwidth (double) : If the segment size is less than its value (in kilobytes), it will be skipped from the bandwidth calculation.
The default value is
0.0
.
Under The Hood Parameters
Please note that the name or meaning of any of these parameters may change in future versions
- low-buffer-level (double) : If the buffer level (in seconds) drop below this level, Viblast will start requesting additional chunks. The default value is "30" seconds.
- dvr-min-duration (integer) : min playlist duration in seconds to consider the stream is DVR. The default value is
300
. - playlist-starting-offset (double) : Start playing from this offset. Example: if set to 0.2 then playback will start 20% inside the CDN playlist. The default value is
0.2
. - chunks-per-hls-entry (integer) : The number of fragments to fragment a CDN entry into.
- base-url (string) : This url will be used for loading additional resources required by Viblast. Here you can find more info.
- append-timestamps (switch on/off) : Append or not timestamp='timestamp' to every request. Helps with browser caches when the same names are reused for different chunks. The default value is
false
. - max-requested-chunks-from-cdn (integer) : The maximum number of open chunk request from the CDN. The default value is
1
. - buffer-while-paused (switch on/off) : If on, Viblast will continue downloading chunks while the player is paused until its buffer is full. The default value is
true
. - playlist-timeout (integer) : Playlist download timeout in ms. The default value is
15000
ms. - vod-buffer-size (integer) : the number of chunks (HLS segments or DASH segments) to buffer in video-on-demand streaming. The default value is
10
. - audio (switch on/off) : indicates presence/lack of audio. If there is no audio in the stream and you've failed to set this parameter as
false
, the playback won't start. The default value istrue
. - video (switch on/off) : indicates presence/lack of video. If there is no video in the stream and you've failed to set this parameter as
false
, the playback won't start. The default value istrue
. - long-pause-timeout (double) : Discard old content if player has been paused for that long in seconds. The default value is
60
seconds. - consume-incomplete-audio-packets (switch on/off) : Enables/Disables processing of incomplete audio PES packets by HLS remuxer. The default value is
true
. - consume-incomplete-video-packets (switch on/off) : Enables/Disables processing of incomplete video PES packets by HLS remuxer. The default value is
true
. - skip-unknown-nal-units (switch on/off) : Forces the remuxer to ignore unknown NAL units. The default value is
false
. - minimal-segment-request-timeout (integer) : Controls the minimal download chunk timeout. The internal download timeout is calculate as: 3*
segment duration
and if the calculated value is less than declared, it is replaced. The default value is200
ms. - maximal-segment-request-timeout (integer) : Controls the maximal download chunk timeout. The internal download timeout is calculate as: 3*
segment duration
and if the calculated value is greater than declared, it is replaced. The default value is30000
ms. - skip-first-non-idr (switch on/off) : Forces the remuxer to start processing after an IDR frame. The default value is
true
. - remuxer-set-sample-flag (switch on/off) : Forces the remuxer to generate flag for Trun sample boxes. The default value is
false
.
PDN (Peer-assisted Delivery Network)
PDN extends your streaming infrastructure with peer-assisted video delivery. See here for more information.
- enable-pdn (switch on/off) : Enables/Disables PDN optimization. The default value is
false
. - webrtc-log (string) : one of error, warning, info, verbose.
- window-size (integer) : The number of chunks to keep in the current window.
- share-segment-size (switch on/off) : Share segment sizes. Speeds up range requests.
- peer-in (integer) : Sets maximal number of incoming connections per peer
- peer-out (integer) : Sets maximal number of outgoing connections per peer
- active-chunk-requests-per-peer (integer) : Set the maximal number of active chunk request per peer
- connect-to-swarm (switch on/off) : Toggles whether this peer should connect to other peers or not
- piece-size (integer) : The size of the piece. This value is used to split a chunk input multiple pieces so that it can be sent using webrtc datachannel
- use-checksums (switch on/off) : do checksumming as a protection mechanism against bad peers and connections
- comm-station (string) : Default Comm station url
- deblacklist-peers-timeout (integer) : timeout before we get peers from the blacklist
- enable-realtime-logger (switch on/off) : Enables/Disables realtime logging
- realtime-logger-server (string) : Server URL for realtime logging