Hello all,

I have installed this module and related modules in order to be able to play mp3s. I followed this brilliant post in order to do so: http://drupal.org/node/473414. I do not host the mp3s myself, they are all being streamed from other sites. Everything works as per the post however, I cannot have multiple players in the same page as they then play simultaneously. This is an issue faced by may and having a little dig I found the following.

Firstly, this is possible as you can see here: http://developer.longtailvideo.com/contributors/nyboe/JW_API_xmpl_1-1-3-...

If you hit play, the other player stops. If you look at the page source, it seems simple but I do not know how to implement that in Drupal so any advice would be great.

Secondly, I tried using swftools as I read on the post that others were having similar issues with the 1 pixleout player. Check it out here: http://drupal.org/node/620624. Specifically, comment number 11 says this:

#11
djflux - December 29, 2009 - 00:17
Not sure if you all want to do this, but the way I fixed this issue was to use a different embedding method in the SWFTools settings. This is how I did it:

Install swftools as normal
Go to the modules page of your site and enable the SWFObject2 module in the SWFTools section of that page
Go to the SWFTools status report at http://[yoursite]/admin/reports/swftools
If you have any warnings, fix them - you will probably need to download the SWFObject2 JavaScript file. Follow the link on the status report page to download the ZIP file
Unzip the downloaded ZIP file into a temporary directory
Create the folder sites/all/modules/swftools/shared/swfobject2 in your Drupal directory
Copy the swfobject.js file from the temporary directory to the sites/all/modules/swftools/shared/swfobject2 folder
Go back to your SWFTools Status Report and verify that SWFObject2 is green and says OK
Go to the SWFTools Embedding settings at http://[yoursite]/admin/settings/swftools/embed
Switch the embedding method to SWFObject2 - JavaScript and check the box Add JavaScript to all pages
Once I performed those actions then my the currently playing 1pixelout player would pause if I started playing another clip on the same page.

This also did not work for me. There are many instances where this is required. I would like to have players listed on the page via taxonomy or views and also players in blocks on the same pages. I therefore need to find a way to make the players mutually exclusive to each other. I also read that IDs could be the issue but not sure how to sort this out.

Any help or advice is much appreciated. Thanks for a great module! (-;

Comments

rengomez’s picture

Priority: Normal » Critical
Issue tags: +mp3, +simultaneous, +auto stop, +jw flv player
rengomez’s picture

Priority: Critical » Normal
rengomez’s picture

The Longtail link above shows the following source. What functions and variables would I add to Drupal and which page would I update with the javascript? Here is that pages source:



JW API Example 1-1-3-0 - JW FLV Media Player

#wrapper1 { width:320px; height:196px; } #wrapper2 { width:320px; height:196px; } #wrapper3 { width:320px; height:196px; } var oldWrapper = null; var oldCode; function removeOldPlayer(theOldWrapper, theOldCode) { document.getElementById(theOldWrapper).innerHTML = theOldCode; } function createPlayer(theWrapper, thePlaceholder, thePlayer, theFile, theStart) { if (oldWrapper != null) { removeOldPlayer(oldWrapper, oldCode); } oldWrapper = theWrapper; oldCode = document.getElementById(oldWrapper).innerHTML; var flashvars = { file:theFile, autostart:theStart } var params = { allowfullscreen:"true", allowscriptaccess:"always" } var attributes = { id:thePlayer, name:thePlayer } swfobject.embedSWF("player_4.swf", thePlaceholder, "320", "196", "9.0.115", false, flashvars, params, attributes); }


JW FLV Media Player

Multiple Mutually Exclusive players.


Only local images are allowed. onclick="createPlayer('wrapper1',
'placeholder1',
'player1',
'http://content.longtailvideo.com/videos/flvplayer.flv',
'true');">


Only local images are allowed. onclick="createPlayer('wrapper2',
'placeholder2',
'player2',
'http://content.bitsontherun.com/videos/qyehIiBT.flv',
'true');">


Only local images are allowed. onclick="createPlayer('wrapper3',
'placeholder3',
'player3',
'http://content.bitsontherun.com/videos/MPKB9prD.flv',
'true');">