AdPlayer.Pro Video Streaming Capabilities

This article acts a reference to configuration options AdPlayer.Pro supports, regarding its video streaming capabilities, i.e. what media to play, player layout, its webpage behavior, etc.

Overview

The AdPlayer.Pro HTML5 video player enables the smooth streaming of video files in all formats, supported by a viewer’s web browser manufacturer, – across all platforms and screens.

See below for more details regarding the player script code, available configuration options, dynamic content management opportunities, and more.

Player Script Code Examples

Your dedicated account manager at AdPlayer.Pro will provide you with the default JS code for further use and customization (see Player Script Configuration Reference below).

Example 1 (static player size):

<script src="https://cdn.stat-rock.com/player/demo.js""></script><script>(function(){     
document.write("<div id='NQnZsTCfCv1TVOZeJTaLZjM9zzUJ240XenGSYnKSUhpgalBwQaIT'></div>"); 
AdPlayerPro('NQnZsTCfCv1TVOZeJTaLZjM9zzUJ240XenGSYnKSUhpgalBwQaIT').setup({
     "autoStart": true,
     "width": "480",
     "height": "360",
     "type": "inStream",
     "file": "https://www.4sync.com/web/directDownload/OzfN6a6s/K5U1HUwJ.bf74ebcb5311cd6f0e79b2b1c7f23408",
     "tapToUnmute": true,
        })
 })();</script>

Example 2 (flexible player size):

<script src="https://cdn.stat-rock.com/player/demo.js""></script><script>(function(){
    document.write("<div id='NQnZsTCfCv1TVOZeJTaLZjM9zzUJ240XenGSYnKSUhpgalBwQaIT'></div>");
AdPlayerPro('NQnZsTCfCv1TVOZeJTaLZjM9zzUJ240XenGSYnKSUhpgalBwQaIT').setup({
    "muted": true,
    "autoStart": true,
    "width": "50%",
    "height": "",
    "type": "inStream",
    "file": "https://www.4sync.com/web/directDownload/OzfN6a6s/K5U1HUwJ.bf74ebcb5311cd6f0e79b2b1c7f23408",
    "tapToUnmute": true,
    "aspectratio": "16:9"   
})
})();</script>

Player Script Configuration Reference

NB! JavaScript Object Notation (JSON) is required in the syntax of the setup blocks. Please beware of the common JSON requirements, e.g. the need for a comma after all but the last element in a list, while configuring the script.

Parameter Description Value
"muted"
Configures whether the player is muted during playback start or not.
true/false
"tapToUnmute"
Configures the “Tap to Unmute” button display.
true/false
"soundByHover"
Configures the sound switch-on onhover.
true/false
"autoStart"
Configures whether the player attempts to begin playback automatically or not.
true/false
"width"
Сonfigures the player width:

Static player size – in pixels
Flexible player size – as parent element percentage*

*If aspect ratio is configured – ONLY flexible player size applied (i.e. width MUST be configured as percentage).

number/number%
"height"
Сonfigures the player height*, in pixels.

*If aspect ratio is configured – NOT applied.

number
"aspectratio"
ONLY for flexible player size.

Configures proportions between the player width and height, if player width is configured as percentage, in the following format: x:y, where:

x refers to the player width,
y refers to the player height.

x:y
"type"
Configures the player type.
inStream
"file"
URL to the video content (file), selected for streaming, i.e.:

  1. on-demand webcasting (MP4 video file), or
  2. live streaming (MPEG-DASH or HLS video).

Examples:

  1. MP4 file:
    "file": "https://example.com/video/1.mp4"
  2. HLS video:
    "file": "https://example.com/video/2.m3u8"
  3. MPEG-DASH video:
    "file": "https://example.com/video/3.mpd"
string
"errorMessage"
Configures the error message describing what went wrong.

Example:

"errorMessage": "Video is not available"
string

Dynamic Content Management

AdPlayer.Pro enables managing streamed video content programmatically by a mere few clicks – by changing the “file” parameter value (URL).