HTML5 player SDK documentation

JavaScript player for Softvelum Low Delay Protocol

SLDP Player HTML5 SDK

Softvelum provides JavaScript SDK packages which you can use on your web sites to enable SLDP low-latency playback. It's a JavaScript-based library that has its API to operate. Here's how you can obtain it:

  1. You subscribe for the SDK using this page.
  2. We send you a software license agreement within 1 business day for e-signature.
  3. Once it's signed, you send a helpdesk request, specifying the list of domains where you plan using our player. Domain levels 2 and below are supported.
  4. Within 2 business days we generate individual builds for each specified domain and send them to you.
  5. As soon as we make SDK update, we'll send you new builds for each domain.
SDK subscription covers our technical support which is provided as long as you are subscribed.

Subscribe now

Please find the player methods and callbacks described below.

SLDP.isMediaSourceSupported() – returns whether current browser supports Media Source Extensions API and hence ability to run SLDP player.

Return value: true if supports, false otherwise.

SLDP Player interfaces

destroy() – destroys given player instance, including MSE objects (Media Source Extensions), UI and connections.

play() – starts playback for given player instance.

pause() – pauses playback for given player instance. Current connection to media server is retained during pause_timeout interval if specified.

stop() – stops playback for given player instance. Current connection to media server is closed immediately.

getVolume() – retruns player volume.

Return value: integer from 0 (muted) to 100 (full volume).

setVolume( volume ) – sets player volume. UI controls are updated according to selected value.

Parameters:

startAbr() – starts adaptive bitrate algorithm (ABR), which performs automatic switching to the best available rendition at a time according to network conditions and CPU processing.

stopAbr() – stops adaptive bitrate algorithm (ABR).

isAbr() – returns whether adaptive bitrate algorithm (ABR) is turned on.

getRenditions() – returns list of available stream renditions.

Return value: array of strings containing available renditions, e.g. ['360p', '720p'].

getCurrentRendition() – returns currently selected rendition.

Return value: string with current rendition, e.g. '720p'.

changeRendition( rendition ) – switches playback to the specified rendition.

Return value: boolean status (true – rendition switching has started, false – another switching is currently in progress).
Parameters:

getStreams() – returns list of streams available for select as renditions.

Return value: array of objects with the following fields:

getCurrentStream() – returns currently selected stream.

Return value: object with the following fields:

changeStream( name ) – switches playback to the stream with the name specified.

Return value: boolean status (true – stream switching has started, false – another switching is currently in progress).
Parameters:

setStreamURL( url ) – sets new SLDP stream URL. Currently playing stream is aborted. If given player instance has "autoplay" parameter set to true, then new stream's playback starts immediately if possible.

Parameters:

setCallbacks( callbacks ) – sets callback functions for given player instance.

Parameters:

SLDP player callbacks:

onConnectionStarted( url ) – invoked when player starts connection to media server.

Parameters:

onConnectionEstablished( streams ) – invoked when connection to media server is established and list of available streams is received. List of renditions available for user is composed depending on those streams and browser capabilities.

Parameters:

onPlay() – invoked when user presses play button, or play() method is executed.

onPause() – invoked when user presses pause button, or pause() method is executed.

onVolumeSet( volume ) – invoked when user changes volume using volume control elements, or setVolume() method is executed.

Parameters:

onConnectionClosed() – invoked when connection to media server is closed due to whatever reason.

onError( error ) – invoked when player error is encountered.

Parameters:

onChangeRendition( rendition, name ) – invoked when user changes rendition, or either changeRendition() or changeStream() method is executed.

Parameters:

onChangeRenditionComplete( rendition, name ) – invoked when rendition switch is complete.

Parameters:

onError( error ) – invoked if SLDP player can't handle given stream URL.

Parameters:

onLatencyAdjustSeek( from, to ) – invoked when seek is performed for automatic latency adjustment (latency_tolerance parameter must be set).

Parameters:

Reference implementation

You can go to Reference page and start some stream there to see an example of player implmentation with our SDK with all existing controls.

Subscribe now



Back to HTML 5 player page