Action Script API for Player

Action Script Api for HSPlayer

This document provides reference information for the HSPlayer ActionScript 3.0 player API. 

Contents

  • Caveats

 

Overview

The action script api for player allows you to control the Hsplayer object through Action Script Programming. The ActionScript API is automatically activated when the player is loaded into another SWF.

Requirements

The end user must have Flash Player 9 or higher installed to view everything correctly.

Getting Started

In order to get the HSPlayer into the solution, you shall have to assign four paths (some of which are optional depending upon the interface required). 1. Video Path : The path to the video . This can be the youtube video path: http://www.youtube.com/v/VIDEO_ID or any direct path to the video http://www.arijasoft.com/edit/videos/asjds.flv 2.Annotations XML path: This will be the file where the annotations information will be stored. Since the annotation XMLs are created at arijasoft site, the path might be pointed to arijasoft.com Please download an Example annotations xml from here 3. Advertisement XML Path: This will be the file where the advertisement information will be stored. You can get a sample advertisement XML file from here 4. Linker XML Path:This will be the file which stores the linking information between annotations and Advertisements. You can find an Example of the linking xml file from here Once you have all the paths, initiate the player in your action script, assign paths and start the player.

Operations

The ActionScript Api allows you to include the HSPlayer into a flash application within a very short length of code.

Functions

1. AnnotationPlayer(videoType:String):

 Initiates the HSplayer. videoType is the type of video that is being loaded. There are two types of video as of now "youTube" and "other". If no type is specified, the default will be taken as "other" type. 

2. AnnotationPlayer.assignVideoPath(vidPath:String) 

Assign the video path to the annotation player. This sets the video path to the player. This can be the direct flv url to the file or the video URL for YouTube videos. 

3. AnnotationPlayer.assignXMLPath(XMLPath:String) 

Assigns the annoations XML path of the video. The annotations on the player are stored in annotations xml file. This file stores the information about the annotations being played in the video. 

You can download a sample annotations file from here 

4. AnnotationPlayer.assignAdvtPath(advtPath:String) 

Assigns the advertisement XML related to the video. This is the file which stores the information about advertisements. The sample file of the same can be got from here 

5. AnnotationPlayer.assignLinkerPath(linkerPath:String) 

Assigns the linker xml related to the video. The file stores the linking information between the annotations and the advertisements. The sample file can be got from here 

6. AnnotationPlayer.setEnableFiveP(enable:Boolean) 

sets whether to enable the fivep view to the video. Takes boolean arguemnt. If it is set to false, the linker and advt paths are optional for assigning. 

7. AnnotationPlayer.playerStart() 

once all the parameters are set. This function might be called which will start the player. 

8. AnnotationPlayer.pausePlayer() 

Pauses the player 

9. AnnotationPlayer.ResumePlayer(event:TimerEvent) 

This function resumes the current playing of the video.

Special Functions

Special functions section yet to be added.

Events

By default, the sdk component takes care of all the loading, error event handling as well as the security sandbox error handling.

Examples

Using the action script library , you can create the solution which will include the HSPlayer into your solution. Please have a look at the screen shot of the solution which adds the component and uses the same in the solution. You can also view the working solution of the player in our Play ground Page

 

Download:

 

Download Action Script Library

You can download the Action Script Library from here

Download Example Action Script Solution

You can download the example Solution from here

 

 

Design by xactive -