Functions and methods - Storm JavaScript Player

MethodReturnsReturn typeDescription
initialize()-voidStarts the player. This method will be called automatically by the constructor unless wait parameter in the constructor has been set to false.
getInstanceID()Instance ID numbernumberThe method returns instance ID of the player.
getLibrary()StormLibrary ObjectStormLibraryThe method returns main StormLibrary object used by the player.
setSize(width:number, height:number)-voidThis method allows to resize the player.
setWidth(width:number)-voidThis method allows to change player width.
setHeight(height:number)-voidThis method allows to change player height.
getWidth()Player widthnumberThis method returns player width.
getHeight()Player heightnumberThis method returns player height.
setTitle(title:string)-voidThe method allows to specify the title displayed in the upper-right corner of the player.
setSubtitle(subtitle:string)-voidThe method allows to specify the subtitle displayed in the upper-right corner of the player (below the title).
getGuiConfig()Object containing player settingsObjectThis method returns an object containing all player preferences (related to its GUI).
addCuePoint(title:string, time:number)-voidThis method adds a CUE point to the player timeline with a given title.
removeCuePoint(time:number)-voidThis method removes a CUE point based on its time.
addEventListener(eventName:string, callback:function)-voidRegisters an event with the player object. Whenever a registered event occurs, player will call a predefined function provided
removeEventListener(eventName:string, callback:function)-voidRemoves event listener from the player.
Table 1. Methods table