Closed (fixed)
Project:
MP3 Player
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2009 at 19:57 UTC
Updated:
6 Jun 2009 at 20:40 UTC
I try to insert this code to block, but it does not work
<?php print theme('mp3player', 'default', 'http://www.xxxxxx.com/files/Kvitka_Tsisik_-_Dva_kolori.mp3', 'Dva_kolori', 'Kvitka_Tsisik',''); ?>
Comments
Comment #1
Oleksa-1 commentedthere is message "file not found"
But this link http://www.xxxxxx.com/files/Kvitka_Tsisik_-_Dva_kolori.mp3 defenitly ok - i checked it in browser..
Comment #2
jdelaune commentedTry 'Default' with a capital D. Let me know if that helps.
Are you requesting the mp3 from the same domain your drupal site is hosted on? i.e. the page requesting it is under the same domain as the file?
Comment #3
Oleksa-1 commentedactually it is not Default , i created additional player with name 'main_page' and yes i request the mp3 from the same domain my drupal site is hosted on.
<?php print theme('mp3player', 'main_page', 'http://www.xxxxxx.com/files/Kvitka_Tsisik_-_Dva_kolori.mp3', 'Dva_kolori', 'Kvitka_Tsisik',''); ?>does not workComment #4
jdelaune commentedWeird can you attach the mp3 for me to test?
Comment #5
gork commentedHi, i had the same problem, i discovered that the reason it doesn't work is that the url (for example http://www.xxxxxx.com/files/whatever.mp3) is always appended to the default files directory url and ends up looking like this if you look at the source for the page: http://www.xxxxxxx.com/sites/default/files/http://www.xxxxxx.com/files/w...
My solution was just to upload my files into the /sites/default/files folder and not specify the location of the file, just put whatever.mp3. As in:
print theme('mp3player', 'Default', 'whatever.mp3', 'Whatever', 'Whatever','');Comment #6
jdelaune commentedThanks dunno how I missed that! Commited a patch that should get rolled out tonight. Let me know how it goes. :)
Comment #7
jdelaune commentedI'm pretty sure this is good now. Let me know if you are still having issues.
Comment #8
mundox commentedI am also trying to use the custom code for this module. But where there should be the mp3 player I get a message saying there's no flash player installed.
If I eliminate the node-audio.tpl.php this error goes away and I get proper playback. My files are uploaded to the default /files directory. What gives?
cheers
edit: I just realized this issue is the actual use of embedding it using custom code, a little different than my issue. I could start another issue thread if necessary.
Comment #9
mundox commentedIf I go to my HTML output, this is what I see in place of the mp3 player embed:
<p id="mp3player_2">It look's like you don't have Adobe Flash Player installed. <a href="http://get.adobe.com/flashplayer/">Get it now.</a></p><script type="text/javascript">AudioPlayer.embed("mp3player_2", {soundFile: "sites/default/files/millen-baird.mp3", titles: "blah blah.", noinfo: "yes",pagebg: ""});</script>It seems like the script is trying to embed a player with the id: mp3player_2
Whereas on the example page of this module the script is embedding mp3player_1
I did make a new player and named it Default2 but it still did not make a difference.
Where else could I look for a solution?
cheers
Comment #10
jdelaune commentedI think the issue is that you are missing a / on your file path. Plus it would be worth clearing all cache on your site.
The mp3player_2 is just a unique id, you probably have more than one instance of a player on your page.
Comment #11
mundox commentedThe script is generated by the module. How is it possible that it's missing a "/" ?
I suppose I should ask: How could I fix it? :)
Comment #12
jdelaune commentedok looks like that's not the problem. Have you tried clearing the cache? It could be the javascript isn't replacing the player tag with the actual player.
Comment #13
mundox commentedI have found the problem. I used too much text in the _title field, that causes the script to break somehow.
I was trying to get biography info into that field but I did not realize the title information is also parsed into the player's window.
I guess I will have to make another field and modify the template code a little.
Also, I am trying to get some text under the picture with no luck. Somehow divs I create inside the .feature class don't give expected results.
But it's not a subject for here..
Thanks for the module, it works great.
Comment #14
jdelaune commentedCheers