UnityWorks! Media Wiki

Page History: XSPFPlayer v3.0 - External Interface

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2009/05/07 17:47


Javascript External Interfaces –

The XSPF Player Stand Alone has the capability of being controlled through javascript as an external interface. Functions such as play, stop and pause may be called through a user action or an event. The following example will give you a basic idea how this connectivity works as we use html input button objects.







Javascript/Player Available Commands –

To allow this to work correctly, the call must be made by pointing to the location of the .SWF object holder and use the following call:

flashCall('command');


In the example code we will be pointing to a "div" with an "id" of "uwm_video".

Function Example Code Description
play document.getElementById('uwm_video').flashCall('play'); Starts video play
stop document.getElementById('uwm_video').flashCall('stop'); Stops video play
rewind document.getElementById('uwm_video').flashCall('stop');
document.getElementById('uwm_video').flashCall('play');
Rewinds all tracks and plays
pause document.getElementById('uwm_video').flashCall('pause'); Pauses Video
(*) All depends on the settings set by UnityWorks! Media.

2008 UnityWorks! Media