Jump to content

controling JW Player with html


madspof

Recommended Posts

Sure thing. However, remember that Java and Javascript are completely different. The only similarity is that they are both programming languages.

 

This could be your javascript:

<script type="text/javascript>
function changeVideo(newsource){
  document.getElementById('video').src = newsource;
}
</script>

 

Then you need your embedded image (I have no idea what you're using, because you haven't included your code):

<embed src="somevideofile.mpg">

 

Finally, you need something that the user does to call the funciton, like a button (or multiple buttons):

<input type="button" value="Click Me!" onclick="changeVideo('someothervideofile.mpg');">

Link to comment
Share on other sites

ok well ive been stabing in the dark and havnt realy come up with much this is my players code

<script type="text/javascript" src="/swfobject.js"></script>

<div id="player">This text will be replaced</div>

<script type="text/javascript">
var so = new SWFObject('/movie.plv','mpl','470','320','9');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','&file=/flash.flv');
so.write('player');
</script>

Do i need to place the script into where they ask for the movie url ?

Link to comment
Share on other sites

Okay well i am using this script on my site which currently works and play a .flv file. I know need to go about control the flash with javascript in the form of a list on the same page. well here is the code could someone show me please im completly stuck.

<div id="container"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</div>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
	var s1 = new SWFObject("player.swf","ply","328","200","9","#FFFFFF");
	s1.addParam("allowfullscreen","true");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("flashvars","file=videos/CRMV0116.flv&image=");
	s1.write("container");
</script>

Link to comment
Share on other sites

follow this concept....don't copy it....it probably won't work

function changeVideo(theVideo) {
   var so = new SWFObject(thevideo,'mpl','470','320','9');
   so.addParam('allowscriptaccess','always');
   so.addParam('allowfullscreen','true');
   so.addParam('flashvars','&file=/flash.flv');
   so.write('player');
}

 

List of links

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.