Class: html5

caph.stripe.ui.widget.audioPlayer. html5

new html5(It, Custum)

This method defines AudioPlayerHTML5 class. Constructor takes two parameter as arguments First argument consist audio player initilization related data Second consists the audioplayer properties Loads audio player for other devices Calls Base class to load player controls Inherits audioplayer base class

Parameters:
Name Type Description
It Object

Contains default values of audio player like height , width , playlist

Custum Object

styles that need to pass to parent class for UI creations

Example
var audioPlayerHTML5Obj = new caph.wui.widget.AudioPlayerHTML5(audioPlayer_option,{width: 50px});

Methods

<static> _initilizePlayer()

_initilizePlayer Audio player with default option , add listeners to player Listeners name and their descriptions. Play : Fires state change event when play event received pause : Fires state change event when pause event received timeupdate : Fires state change event when timeupdate event received pass current time and total duration of audio file to receiver error : Fires state change event when error event received send error cause to received Playing : Fires state change event when playing event received loadstart : Fires state change event when loadstart event received seeked : Fires state change event when seeked event received canplay : Fires state change event when canplay event received

<static> forward()

This method forward audio frame by 10 second. We are making call to web - kit engine / device api 's, any run time exception from web-kit engine/device api' s like unable to play / pause / stop etc need to be handle from our side so that our widget should not behave unexpectedly

Example
audioObj.forward();
 

<static> getDuration() → {object}

This method get Duration time of player. We are making call to web - kit engine / device api 's, any run time exception from web-kit engine/device api' s like unable to play / pause / stop etc need to be handle from our side so that our widget should not behave unexpectedly

Returns:

a Duration time *Properties :

millisecond - (Number) timeString - (String)

Type
object
Example
audioObj.getDuration();

<static> pause() → {Boolean}

This method pauses playback of Player. If the player state is not playing, this function does nothing. We are making call to web-kit engine/device api's, any run time exception from web-kit engine/device api's like unable to play /pause /stop etc need to be handle from our side so that our widget should not behave unexpectedly

Returns:

Success or not with this operation.

Type
Boolean
Example
audioObj.pause();

<static> play()

This method plays the audio 0th item from playlist Before play it checks if playlist exists. We are making call to web-kit engine/device api's, any run time exception from web-kit engine/device api's like unable to play /pause /stop etc need to be handle from our side so that our widget should not behave unexpectedly

Example
audioObj.play();
 

<static> resume() → {Boolean}

This method resumes playback of Player. If the player is not paused, this function does nothing. We are making call to web-kit engine/device api's, any run time exception from web-kit engine/device api's like unable to play /pause /stop etc need to be handle from our side so that our widget should not behave unexpectedly

Returns:

Success or not with this operation.

Type
Boolean
Example
audioObj.resume();

<static> rewind()

This method rewind audio frame by 10 second. We are making call to web - kit engine / device api 's, any run time exception from web-kit engine/device api' s like unable to play / pause / stop etc need to be handle from our side so that our widget should not behave unexpectedly

Example
audioObj.rewind();
 

<static> stop() → {Boolean}

This method stops playback of Player. We are making call to web - kit engine / device api 's, any run time exception from web-kit engine/device api' s like unable to play / pause / stop etc need to be handle from our side so that our widget should not behave unexpectedly @ example audioObj.stop();

Returns:

Success or not with this operation.

Type
Boolean