HTML5 Parameters2018-05-13T21:24:10+00:00

Player Parameters

Introduction

You can configure Airbroad player by passing parameters to airbroad_player().

You can pass the value of parameter to airbroad_player() with the following format :

{“parameter1 name” : value, “parameter2 name” : value, …}

Below is an example of a embed code with the relevant sections highlighted.

Example :

<html>
<head>
	...
	<script type="text/javascript" src="http://yourdomain/airbroad.js"></script>
</head>
<body>
	...
	<div id="player_location"></div>
	<script type="text/javascript">
		var player = airbroad_player({
			"container" : "player_location",
			"file" : [“http://yourdomain/test1.mp4”, “http://yourdomain/test2.mp4”,
					“http://yourdomain/test3.mp4”],
			"autoplay" : false, 
			"loop" : false, 
			“controls” : “always” 
			});
	</script>
</body>
</html>

List of available parameters

Name Value Default Description
file string array List of Video URLs (Mandatory)
file_num  ≥ 0 0 This number indicates which video to start playback at beginning.
container string

The ID of the container you want to embed the player into.
When “container” is not specified, the player is placed into where the script is loaded.

poster string false  The URL of poster image
width  > 0  896 The width of the player.
When “width” is not set while “height” is set, player automatically adjust the width while keeping aspect ratio as 16:9.
Automatically set to 896 if “width” and “height” are not specified.
height  > 0  504 The height of the player.
When “height” is not set while “width” is set, player automatically adjust the height while keeping aspect ratio as 16:9.
Automatically set to 504 if “width” and “height” are not specified.
controls “always”

“true”

“false”

“none”

“true” If set to “always” , show the controls always.

If set to “true”, show the controls for a while only when cursor is over a video or user taps a video.

If set to “false”, show the minimal controls including play button and fullscreen button while not showing progress bar.

If set to “none”, All controls and progress bar are not shown.

autoplay true, false false Play a video automatically if set to true
loop true, false false Automatically replay the video if set to true
start  ≥ 0 Playback start point. Video starts from the beginning if not set.
end  > start Playback end point. Video plays till the end of its duration if not set.
auto true, false false Automatically change the resolution if set to true
speed true, false false Show the playback speed control if set to true