Each Account on Icareus Suite has its own URL for live player. It can be constructed as follows:
https://suite.icareus.com/web/org_name/player/live?channelId=SOME_NUMBER
org_name: Name of your organisation. Name of organisation is shown in url in address bar as the word followed by 'group' string in admin site.
channelId: System id of the live channel. Can be obtained from 'Channels' - 'Details'.
Table: Supported Query Parameters
| Name | Value | Requirement | Info |
|---|---|---|---|
| channelId | number | Mandatory | System Id of the channel |
| showEpg | number | Optional | Specifies if EPG data for channel should be shown. 0 = hide, 1 = show |
| appId | number | Optional | Application id for instance configuration |
Live player parameters explained:
| Number | Parameter | Values | Example | Description |
|---|---|---|---|---|
| 1 | AUTOPLAY | true/false | true | Defines if the live streams is started automatically when the player is loaded |
| 2 | WIDTH | Selection | 1280 | Sets the width of the player (if embedded is set true, this configuration is ignored) |
| 3 | HEIGHT | HTML color code | 720 | Sets the height of the player (if embedded is set true, this configuration is ignored) |
| 4 | RESPONSIVE | true false | false | If the player should adapt to screen/device (if true, width and height value is ignored) |
| 5 | EMBEDDED | true/false | true | If the player should adapt to screen/device (if true, width and height value is ignored) |
| 6 | BACKGROUND IMAGE URL | Web link (URL). Recommended format is .png or .jpg. | http://www.company.com/media/logo1.png | Write the URL to the background you want to use on live player. Logo is shown on top of the video on the right bottom corner. |
| 7 | LOGO IMAGE URL | Web link (URL). Recommended format is .png or .jpg. | http://www.company.com/media/logo1.png | Write the URL to the logo you want to use on live player. Logo is shown on top of the video on the right bottom corner. |
| 8 | SKIN | The name of the skin to be used - available values are: 's1', 's2', 's3', 's4'. Default: 's1'. | s1 | The name of the skin to be used. Skin defines the look and feel of the player |
| 9 | BORDER WIDTH | border width in pixels | 5 | Borders are drawn around the player |
| 10 | BORDER COLOR | color in HTML color HEX code | #2A3239 | |
This library allows a page with video player to register current device with unique ID, fetch video URLs for the selected channel to play on the player and send video usage statistics to the server.
The library is available at the Icareus Suite server under the path /lib/js/v1/players/live.js. Note, that LIVE library uses JQuery library and if it is not available on the page, it is automatically embedded from the official JQuery site.
At the beginning the device where the page is opened is automatically registered at the Icareus Suite server with the unique ID. It is stored as the browser cookie and will persist for one year. Thus all requests from the same device will hold the same device ID used for video usage analyses.
If callback for the player setup function is provided, for the given channel ID the LIVE library gets the source video URLs from the Icareus Suite server, stores them and calls the player setup function.
Also LIVE library updates the player, so that it would report video usage statistics to the server.
Before loading, LIVE library must be configured using the JSON object with the name '_icareus'. It holds the required parameters and is used to keep data received from the server.
Parameters:
| Name | Value | Example | Requirement | Info |
|---|---|---|---|---|
| companyId | number | 10154 | Mandatory | The company ID where organization is - given |
| groupId | number | 241825 | Mandatory | The group ID where organization is - given |
| organizationId | number | 241824 | Mandatory | The organization ID where linear channels are - given |
| playerId | string | 'onDemandPlayer' | Mandatory | The ID of the player on the page |
| playerSetup | string | 'startOnDemandPlayer' | Optional | If given, this function will be called when video URLs for the given channel are received from the server. They will become available as 'sources' parameter of the '_icareus' object. That can be used, for example, to setup and start video player. If not provided, it is assumed that video player knows how to fetch video URLs for the given linear channel. |
| host | string | 'http://192.168.1.146/' | Optional | If given, this host will be used as the Icareus Suite server. If not provided, it is assumed that the page is located on the Icareus Suite server. |
| itemId | number | 248920 | Optional | If given, it holds the asset ID to play on the video player. If not provided, it is assumed that channel ID is given as the 'channelId' or 'itemId' parameter for the page URL. |
Example:
var _icareus = {}; _icareus['companyId']=10154; _icareus['groupId']=241825; _icareus['organizationId']=241824; _icareus['playerId']='onDemandPlayer'; _icareus['playerSetup']='startOnDemandPlayer'; _icareus['itemId']=248920; |
To embed the LIVE library, just place the provided code on the page and define the correct location of the library.
(function() { var vod= document.createElement('script'); vod.type = 'text/javascript'; vod.async = true; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(vod, s);})(); |
This example shows how LIVE library can be used together with JWPlayer. It is assumed, that channel ID is provided as a parameter to the page URL and the page is not located on the Icareus Suite server.
<html> <head> <script type="text/javascript" src="/jwplayer/jwplayer.js"></script> <script type="text/javascript"> var _icareus = {}; _icareus['companyId']=10154; _icareus['groupId']=241825; _icareus['organizationId']=241824; _icareus['playerId']='onDemandPlayer'; _icareus['playerSetup']='startOnDemandPlayer'; (function() { var vod= document.createElement('script'); vod.type = 'text/javascript'; vod.async = true; vod.src = _icareus['host']+'/lib/js/v1/players/live.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(vod, s); })(); </script> <script type="text/javascript"> function startOnDemandPlayer() { jwplayer("onDemandPlayer").setup({ flashplayer: "/jwplayer/jwplayer.flash.swf", html5player: "/jwplayer/jwplayer.html5.js", sources: _icareus["sources"], primary: "html5", width: 640, height: 360, mute: "false", stretching: "fill" }).onReady(function() { this.play(); }); } </script> </head> <body> <div id="onDemandPlayer"/> </body></html> |