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

Make Media Player a Popup/Detachable Player?


I want to allow a link option under the player to make it a pop-up option so folks can listen to the mix while the peruse the site. Is this possible?

13 Community Answers

JW Player

User  
0 rated :

Lots of popup code posted here: [url=http://www.jeroenwijering.com/?search=popup]*SEARCH: POPUP*[/url]

JW Player

User  
0 rated :

I have a code that's quite simple. I haven't figured out how to do player configuration yet, such as colors, but the code works.

bc.. <a href="http://*****URL DOES NOT ALTER FILE*****" onclick="var win=window.open('','mywindow','height=355, width=425');win.document.write('\x3Chtml\x3E\x3Chead\x3E\x3Ctitle\x3E*****WINDOW TITLE*****\x3C/title\x3E\x3Cstyle\x3Ehtml,body {margin:0;padding:0;}\x3C/style\x3E\x3C/head\x3E\x3Cbody\x3E\x3Cembed src=\'*****http://www.jeroenwijering.com/embed/mediaplayer.swf*****?file=*****FILE*****&autoStart=true\' width=\'425\' height=\'355\' quality=\'high\' type=\'application/x-shockwave-flash\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\'\x3E\x3C/embed\x3E\x3C/body\x3E\x3C/html\x3E');return false;">*****TEXT TO ACTIVATE POP-UP*****</a><!-- ParagraphBodyEnd --></div>
<div class="fw-paragraphbottom"></div>


Take out the stars and replace it with what I specified. An example page is http://www.bwcfilms.co.nr/iliberal

Underneath the embedded video, click the text for a pop up video window.

JW Player

User  
0 rated :

please checkout the (source of the) [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/openwin.htm]openwin[/url] demo and [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/sizedemo.htm]sizedemo[/url] (linked from the [url=http://home5.inet.tele.dk/nyboe/flash/mediaplayer/]demopage[/url])

JW Player

User  
0 rated :

*To control popup window from parent*


In your popup window's html:

bc.. var so = new SWFObject('/swf/mediaplayer.swf','hl_player','300','400','7');
so.addParam('allowfullscreen','true');
so.addVariable('file','http://url');
so.addVariable('autostart','false');
so.addVariable('displaywidth','0');
so.addParam('allowscriptaccess','always');
so.addVariable('javascriptid','hl_player');
so.addVariable('enablejs','true');
so.write('flashplayer');

function thisMovie(swf) {
if(navigator.appName.indexOf('Microsoft') != -1) {
return window[swf];
} else {
return window.document[swf];
}
}

// this is the important part
var addFile = function(obj) {
thisMovie('hl_player').addItem(obj);
}

// periodical executer from prototype js library http://www.prototypejs.org/
// this line updates the reference in the parent window to point to the popup, even if the user navigates to another page
// (as long as the user stays in the same window/tab, that created the popup). 5 means the reference is updated every 5 secs

var pe = new PeriodicalExecuter(function(){ window.opener.player_window = window }, 5);


in the main pages (where you want to interact with the popup player):

bc.. var player_window = window.open... // store reference of the popup window



bc.. // adding a file to the popup players playlist
player_window.addFile('/path/to/file/file.ext');



remember replicate every function you want to use in the popup window's javascript, like addFile() in this example

JW Player

User  
0 rated :

This is something I am trying to achieve at the moment.

Would it be possible to clarify the 2 sections slightly?

As i unserstand it cuerrently, the popup code site in <script> tags and a <div id="flashplayer"> is required to write the flash.
Is this all that would be required in the popup(including standard html markup)?

And for the main (controller) window i'm a little lost.

bc.. var player_window = window.open... // store reference of the popup window

goes into a script tag? The ... suggests more code would be needed

bc.. player_window.addFile('/path/to/file/file.ext');

is this just the link to execute the command?

i.e.

<a href="javascript:player_window.addFile('test.mp3');">addFile</a>

any extra pointers you can give would be a great help

thanks

JW Player

User  
0 rated :

I can now play individual songs on the popup using:

<a href="javascript:addItem({file:'song1.mp3'})" target="name">ADD</a> ~(where 'name' is the name of my popup window)

however this completely reloads the popup each time, so restarts the audio. Is it possible to send this addfile command without refreshing the popup window?

JW Player

User  
0 rated :

Good popup code in these threads:

http://www.jeroenwijering.com/?thread=9558

http://www.jeroenwijering.com/?thread=9995

JW Player

User  
0 rated :

<strong></strong>

JW Player

User  
0 rated :

new popup example here: - http://home5.inet.tele.dk/nyboe/flash/mediaplayer4/JW_API_xmpl_7-3-0-0.html
linked from: - http://home5.inet.tele.dk/nyboe/flash/mediaplayer4

JW Player

User  
0 rated :

Hi,I'm Kaitlyn.Welcome to the Super Mario Flash 3 Nes Version.

JW Player

User  
0 rated :

<strong></strong>bc..
bc..

JW Player

User  
0 rated :

Let's say you click your main website link... http://-------.com
And a media player pops up as soon as you go to the first page.. is this possible?
I'm using a free website host, so each of my links go to different pages...

Ethan Feldman

JW Player Support Agent  
0 rated :

Yes it is.

Here is a demo of a pop up – http://developer.longtailvideo.com/contributors/nyboe/JW_API_xmpl_7-3-0-0.html

This question has received the maximum number of answers.