Reputation: 1868
I downloaded 'JW-Player-5.2-Pro' and my files are shown in the picture. theres no 'jwplayer.js' file there so can't use javascript api. 'video.flv' is embeded on 'readme.html' as:
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="400" height="315">
<param name="movie" value="player.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="flashvars" value="file=video.flv&image=preview.jpg" />
<embed
type="application/x-shockwave-flash"
id="player2"
name="player2"
src="player.swf"
width="400"
height="315"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="file=video.flv&image=preview.jpg"
/>
</object>
but I want to handle the player actions(http://www.longtailvideo.com/support/jw-player/28851/javascript-api-reference) by custom buttons. how can I do that ?
-thanks.
Upvotes: 1
Views: 938
Reputation: 4201
You should really upgrade to JW6 because then you can make use of the JavaScript API. Staying on JW5 and using the object method of embed is pretty old. The only way of adding buttons in this case is via a custom Flash plugin for JW5.
Upvotes: 0
Reputation: 8781
If you mean that you want to trigger player actions by custom buttons than you should do something like this:
<ul>
<li onclick='jwplayer().play()'>Start playback</li>
<li onclick='alert(jwplayer().getVolume())'>Get audio volume</li>
</ul>
If you want to handle the events you should go with :
jwplayer().onPlay(function(){
//your code goes here
})
Works with jwpalyer 6.0
Upvotes: 1
Reputation: 3826
That reference you're point at is for JW Player 6, not 5.2. I just downloaded JW Player 6 and there's a file called jwplayer.js
and jwplayer.html5.js
there. So you need to upgrade.
Upvotes: 1