With Stream Monkey, you have a lot of control over your player, both through the initial player setup (in your account) and through query parameters that you can add to the embeddable player link. Below we’ve provided a breakdown of all the cool things you can do just by adding a query parameter to the end of your embed code.

Start out by finding your embed code in your account. You can find this under your stream or video under the “Embed” button. It will look something like this: 

<div class="smEmbed" style="padding: 0 0 56.25% 0;position: 
relative;height: 0;overflow: hidden;"><iframe
src="//player.streammonkey.com/iframe/2rpd0r6a" width="100%"
height="100%" frameborder="0" style="position: absolute;top:
0;left: 0;width: 100%;height: 100%;" allow="autoplay"
allowfullscreen webkitAllowFullScreen mozAllowFullscreen></iframe>
</div>

To add a query string below, you'll add it into your embeddable player code with a     ?code. For example, adding a range of bitrate from 0-5000 kbps would look like:

https://player.streammonkey.com/iframe/[ID]?range=0-5000

After adding that into the embed code it would look like this: 

<div class="smEmbed" style="padding: 0 0 56.25% 0;position: 
relative;height: 0;overflow: hidden;"><iframe
src="//player.streammonkey.com/iframe/1r0dbrja?range=0-5000"
width="100%" height="100%" frameborder="0" style="position:
absolute;top: 0;left: 0;width: 100%;height: 100%;"
allow="autoplay" allowfullscreen webkitAllowFullScreen
mozAllowFullscreen></iframe></div>

If you want to add multiple options, you can do so using an & in between each request. For example:

https://player.streammonkey.com/iframe/[ID]?range=0-5000&autostart=false

Bandwidth and Bitrates

  • Preferred Bitrate ( __b__ )
    By default, the player starts with the highest bitrate available, then moves down as needed depending on the viewer's internet connection. You can designate a specific bitrate stream to be the “preferred” bitrate instead, meaning the end user’s player would start with this bitrate before adjusting to another bitrate, depending on network conditions. For example: ?__b__=500 
  • Bandwidth Correction ( bwcorrection )
    This query string can be used to adjust the bitrate advertised in the Variant Playlist’s BANDWIDTH attribute (values are space-delimited). Values can be from 0 to +/-100. For example: ?bwcorrection=5 10-10 
  • Bitrate Filtering ( range )
    Designate a bitrate range (in kbps) outside of which the stream or streams you wish to filter fall. For example: ?range=500-1200 

Source

  • Exclude Backup Streams ( bkup )
    You can use the backup query string to enable or disable inclusion of backup bitrates in the Child Playlist (the default setting for this feature is on). For example: ?bkup=off 
  • Playback from a Single Source ( playonly )
    When both the primary and backup feeds are published for a stream, the playonly query string can be used to play back just the primary or backup feed, in either Live or Archive mode. This can be used if there is a business use case or to test these two feeds independently. The play-only query string can have the values primary or backup. For example: ?play-only=primary 

DVR

  • DVR Window ( dw | n )
    dw
     - This query string allows you to dynamically configure the playback DVR window by designating the number of seconds (whole seconds without decimals) in the window. For example:?dw=100  
    n - This query string allows you to dynamically configure the playback DVR window by designating the number of segments to include in the Child Playlist. For example: ?n=10 
  • Flexible Playback ( start | end )
    This query string enables viewers to begin playback at a specific time within the stream’s DVR window throughout the playback session. Both start  and end  are formatted in unix timestamp. For example: ?start=1326048&end=1326069248
     Note: The start time is mandatory but the end time is not.

Audio Only

  • Extracted Audio-Only Stream ( __a__ )
    When enabled in a Streaming configuration, the Edge server automatically generates an audio-only stream from one of your bitrate streams. You can use the __a__ query string to disable this feature on a per-stream basis. Possible values are on and off. For example: ?__a__=off 

Closed Captioning

  • Closed Caption Attribute ( setccattribute )
    The setccattribute query string is for HLS streams on a per-stream basis. Closed Captions are usually embedded into your video asset. Possible values are none  and cc . For example: ?setccattribute=none 

Segment Duration (setsegmentduration)

This controls the segment duration for your streams. By default, segment duration is set to 10 seconds. There are three options:

  • smoothest - This is the default, 10 seconds. This is optimized for smoothest streaming experience with low level of buffering incidents but it causes delay from live streaming. For example: ?setsegmentduration=smoothest
  • quality - 6 seconds. Closer to real-time streaming but still favoring quality of delivery over delay. For example: ?setsegmentduration=quality
  • responsive - 4 seconds. Low delay from live streaming; some quality degradation might occur. For example: ?setsegmentduration=responsive

Player UI Controls

  • Autostart ( autostart )
    This controls if the player will auto play the video on load. Possible values are true  and false . For example: ?autostart=false 
  • Controls ( controls )
    You can disable all player controls by setting this to false. By default, true is enabled. For example: ?controls=false 
  • Play scrub control bar ( controlbar )
    If you need to remove the scrub control bar (for example in a live stream with DVR enabled where you don't want the viewer to scrub back in time), you can set this to false . For example: ?controlbar=false 
  • Mute ( mute )
    To ensure audio is turned off when a video plays, you will set this query string to true. Mute being true will ensure no audio is present. By default, this is set to false. For example: ?mute=true 


*Note: These values are in kbps and are applied to the combined audio + video bitrate.

Did this answer your question?