Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Onclick Button > Popup video


I want to be able to click a button and a popup appears with a video. The closest thing I found was this example : http://developer.longtailvideo.com/contributors/nyboe/JW_API_xmpl_7-3-0-0.html

But I tried playing with the code but I didn't bare any results.

15 Community Answers

Ethan Feldman

JW Player Support Agent  
2 rated :

Do you have a link to where you tried to do this?

JW Player

User  
0 rated :

I know I'm doing something wrong, I just don't know what.

Here is the code :
<p><br /><br /></p>
<div id="wrapper"><object id="player1" name="player1" data="http://icepmiami.com/jwplayer/jwplayer.flash.swf" width="320" height="296" type="application/x-shockwave-flash"></object></div>
<p><br /><input onclick="createWindow('http://www.youtube.com/watch?v=90Omh7_I8vI?'+currentItem)" id="buttonId1" style="visibility: visible;" type="button" value="Click to show player in popup window" /><br /><input onclick="popWin.close(); initPlayer()" id="buttonId2" style="visibility: hidden;" type="button" value="show player here" /> <input id="buttonId3" style="visibility: hidden;" p="" v="" type="text" /></p>

Here is the link: http://icepmiami.org/on-click-popup.html

Ethan Feldman

JW Player Support Agent  
-1 rated :

You are using JW6 here, which doesn’t work with <object> / <embed> tags.

http://www.longtailvideo.com/support/jw-player/28834/migrating-from-jw5-to-jw6

JW Player

User  
0 rated :

Ok so I got the videos to work exactly how I like, but I want to be able to have it all within a popup window which is activated by the press of a button.

Here is the code:
<div id="container"></div>
<p sizset="false" sizcache08376321864121006="55 116 12" sizcache05707253470432179="31 78 12" sizcache05873051774711043="133 120 32" sizcache040274686933061843="85 116 52" sizcache0807456708475688="59 116 32" sizcache049609609914265756="59 116 32" sizcache06321511979633001="59 116 32" sizcache05140574717901789="83 116 52" sizcache09520930347769002="59 116 32" sizcache002775441657412292="251 128 32" sizcache09629256161006586="59 116 32" sizcache09453013577738715="41 78 12" sizcache06898399829277826="50 78 21" sizcache05805644404638741="124 116 32" sizcache08567232768835209="59 116 34" sizcache06661663363842454="59 116 34" sizcache06340851954571629="133 116 98" sizcache07152457184376217="59 116 33" sizcache05760973550698568="59 116 35" sizcache011648626451576366="59 116 27" sizcache07468346015805072="81 116 39">
<script type="text/javascript">// <![CDATA[
jwplayer("container").setup({
flashplayer: "http://icepmiami.com/jwplayer/jwplayer.flash.swf",
file: "http://www.youtube.com/watch?v=YL1Xtk5INIE",
image: '/gallery/124893.png',
height: 360,
width: 640
});
// ]]></script>
</p>
<p sizset="false" sizcache05760973550698568="58 58 19" sizcache011648626451576366="58 58 11" sizcache07468346015805072="20 58 5"><a onclick="jwplayer().load({file: 'http://www.youtube.com/watch?v=YL1Xtk5INIE'});jwplayer().play(); " href="#">Preaching </a></p>
<p></p>
<p sizset="false" sizcache011648626451576366="58 58 15" sizcache07468346015805072="20 58 9"><a onclick="jwplayer().load({file: 'http://www.youtube.com/watch?v=zRBqBDek87E'});jwplayer().play(); " href="#">Evangelism </a></p>
<p></p>
<p></p>
<p sizset="false" sizcache011648626451576366="58 58 21" sizcache07468346015805072="20 58 15"><a onclick="jwplayer().load({file: 'http://www.youtube.com/watch?v=o7wU32DqftY'});jwplayer().play(); " href="#">Mother's Day </a></p>
<p></p>

Here is the link: http://icepmiami.org/video-playlist.html#

Ethan Feldman

JW Player Support Agent  
0 rated :

I would recommend making a page with just nothing on it other than the player.

Then, you just need to use the simple window.open() command in JS to load that blank page in a new pop up.

http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

JW Player

User  
0 rated :

Thanks man, you've helped me again.
I got this: http://icepmiami.org/extra-page-to-pop-up.html

Ethan Feldman

JW Player Support Agent  
0 rated :

Np, it works!

JW Player

User  
0 rated :

But how to open the link to the video in my website?

http://vova0123210.narod.ru/

bc.. <!doctype html>
<html>
<head>
<title>JW Player</title>
<script type="text/javascript" src="jwplayer/jwplayer.js"></script>
</head>
<body>
<h1>JW Player</h1>
<div id="myElement">Loading the player...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
file: "uploads/video.mp4",
image: "uploads/preview.jpg"
});
</script>
<p><a onclick="jwplayer().load({file: '/uploads/intro.mp4'});jwplayer().play(); " href="#"> The video in my website</a></p>
<p></p>
<p></p>
<p><a onclick="jwplayer().load({file: 'http://www.youtube.com/watch?v=o7wU32DqftY'});jwplayer().play(); " href="#">Mother's Day </a></p>
</body>
</html>



JW Player

User  
0 rated :

I had a bad file mp4. Now works well.
One more question? How to remove the toolbar when clicked not moving cursor on the screen?

Ethan Feldman

JW Player Support Agent  
0 rated :

Glad you got it. Set controls to false.

JW Player

User  
0 rated :

bc.. <div id="container">Loading the player...</div>

<script type="text/javascript">
jwplayer("container").setup({
flashplayer: "/jwplayer/player.swf",
height: 270,
width: 480,
image: "/thumbs/video.jpg",
levels: [
{ file: "http://example.com/videos/video.mp4" }, // H.264 version
{ file: "http://example.com/videos/video.webm" }, // WebM version
{ file: "http://example.com/videos/video.ogg" } // Ogg Theora version
]
});
</script>


????? ?? ?????????? ??? ???????? ?? ???? ?????? onclick?

JW Player

User  
-1 rated :

Sorry, asked in Russian. Since I ask in English.
Can I put these actions on one link onclick?

Ethan Feldman

JW Player Support Agent  
1 rated :

It could be done via this method – http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/16025/loading-new-content-into-the-player

JW Player

User  
1 rated :

With this method, there are three links, I asked about a single link which trying to open three files. In the above example, this is the case.

Ethan Feldman

JW Player Support Agent  
0 rated :

Yes, you can do that, just use the single link, and do a load() and load a playlist, with multiple sources.

This question has received the maximum number of answers.