JavaScript Api for HSPlayer

This document provides reference information for the HSPlayer JavaScript API.

Content

  • Overview
  • Requirements
  • Operation
  • Examples
    • Live Demos
    • Embedding the code in a html page

Overview:

The javascript api allows users to integrate the HSplayer right into their web pages without much coding work.
The basic loading functionality of the SDK can be written using this SDK.

Requirements:

The end user needs to have Flash Player 9 or above to have this sdk properly working.

Operation:

Function:

The api supports only one function which will allow the user to load the HSplayer into the site

loadFivePPlayer( ):

The function loads the HSPlayer. The following are the arguements to be given to the function

  1. Video Url: The url of the video to be played by the HSPlayer.
  2. Annotation XML Url: The url of to the XML file which contains the annotations
  3. Advertisement Url: The url of the XML file which contains advertisement details
  4. Linker XML url : The url of the xml file containing the linking information between advertisements and annotations.
  5. Enable FiveP : If value is given, the FiveP view will be set. Else it will not be shown on the player window
  6. Container Div: The name of the division where the swf needs to be loaded
  7. Player Div: The name of the division where the player needs to be loaded
  8. VideoType : The type of video being loaded into the player. If the video link is from youtube, specify as "youTube" or else leave as "other".

<div id="d72cf56c0c8e2fb4play">
<div id="d72cf56c0c8e2fb4playmov">play movie here</div></div>
<script type="text/javascript" src="http://www.arijasoft.com/jiwokal/uhiiaw/hseditor/dev/v22/swfobject1-5/swfobject.js"></script>
<script type="text/javascript" src="http://www.arijasoft.com/jiwokal/uhiiaw/hseditor/dev/v22/basic_player.js"></script>
<script type="text/javascript">
loadFivePPlayer("http://www.youtube.com/watch?v=MGW-829RXi8","http://www.arijasoft.com/jiwokal/uhiiaw/hseditor/dev/v22/saved/d72cf56c0c8e2fb4.xml","http://www.arijasoft.com/jiwokal/uhiiaw/hseditor/dev/v22/advt/d72cf56c0c8e2fb4.xml","http://www.arijasoft.com/jiwokal/uhiiaw/hseditor/dev/v22/linker/d72cf56c0c8e2fb4.xml","1","d72cf56c0c8e2fb4play","d72cf56c0c8e2fb4playmov","youTube");
</script>

You will need one more javascript file to include the function which will be available here

Live Demo:

You can see the live demo of the player using javascript function here..
Embedding code into html page:To embedd the code into a html page, simply copy paste the two import js files and add the function loadFivepPlayer call to the javascript.

Design by xactive -