UnityWorks! Media Wiki
Navigation
Main Page
Categories
All Pages
Login/Logout
Your Profile
Create Account
Language Selection
Create a new Page
Administration
File Management
Quick Search
Advanced Search »
Back
History
XSPFPlayer v3.0 - External Interface
<table align="center" width="650" height="32"><tr><td background="http://wiki.dealervideos.com/Images/uwmscreens/x.jpg"> '''<font color="#000000"> Javascript External Interfaces –</font>''' </td></tr></table> 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. <center> <iframe src="http://wiki.dealervideos.com/Samples/sampleA.html" height="320" width="450" border="0" scrolling="no" frameborder="0" marginheight="0" marginwidth="0" ></iframe> </center> '''<font color="#000000">Javascript/Player Available Commands – </font>''' 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: <center> (((flashCall(''''command'''');))) </center> In the example code we will be pointing to a "div" with an "id" of "uwm_video". <table border="1" cellpadding="5"> <tr> <td bgcolor="#CCCCCC"><font color="brown">'''Function'''</font></td> <td bgcolor="#CCCCCC"><font color="brown">'''Example Code'''</font></td> <td bgcolor="#CCCCCC"><font color="brown">'''Description'''</font></td> </tr> <tr> <td>'''play'''</td> <td>document.getElementById('uwm_video').flashCall('play');</td> <td>Starts video play</td> </tr> <tr> <td>'''stop'''</td> <td>document.getElementById('uwm_video').flashCall('stop');</td> <td>Stops video play</td> </tr> <tr> <td>'''rewind'''</td> <td>document.getElementById('uwm_video').flashCall('stop');<br>document.getElementById('uwm_video').flashCall('play');</td> <td>Rewinds all tracks and plays</td> </tr> <tr> <td>'''pause'''</td> <td>document.getElementById('uwm_video').flashCall('pause');</td> <td>Pauses Video</td> </tr> </table>
2008
UnityWorks!
Media