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 “Sharing” 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/######" 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
. For example, adding a range of bitrate from 0-5000 kbps would look like:
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/######?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:
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:
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:
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-1200You may also specify lower or upper ranges. For example, if you want all bitrates greater than 500:
?range=500-, or if you want to exclude bitrates between 400 and 700:
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:
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:
Audio-Only Stream ( __a__ )You can use the query string to set the stream to audio only, when available. Possible values are on or off.
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:
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:
Note: The start time is mandatory but the end time is not.
Closed Caption Attribute ( set-cc-attribute )The set-cc-attribute 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:
Segment Duration (set-segment-duration)
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:
quality - 6 seconds. Closer to real-time streaming but still favoring quality of delivery over delay. For example:
responsive - 4 seconds. Low delay from live streaming; some quality degradation might occur. For example:
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:
Controls ( controls )You can disable the player controls below the seek bar by setting this to false. By default, true is enabled. For example:
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:
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:
*Note: These values are in kbps and are applied to the combined audio + video bitrate.