Closed (duplicate)
Project:
MP3 Player
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2010 at 10:14 UTC
Updated:
26 Feb 2011 at 18:43 UTC
This is because the file path is absolute; replacing
$audio_url = $file;
with
$audio_url = file_create_url($file);
in mp3player.module at line 1196
fixes the problem, but I don't know if that would break it when the download method is set to public.
Comments
Comment #1
ad1957 commentedMy test site is set to have private upload but I can’t get the mp3player to work under these circumstances (with public file system it works right out of the box) …
My test clearly shows that the upload itself works (see Upload link below) but when mp3player handles the file something happens, please any other suggestions …
- Upload link -
The file and link to the file which is shown on the same node as the player shows correctly and works: http://clearos.lan/test_01/?q=system/files/admin/ringo_01.mp3
But …
- Mp3player -
Original code ($audio_url = $file;) in mp3player.module gives the following result:
Play the file through mp3player (the link as seen through the source code):
<object id="mp3player_1" … <param value="soundFile=/test_01//var/www/audio/admin/ringo_01.mp3&playerID=mp3player_1" name="flashvars"></object>The changes you suggest ($audio_url = file_create_url($file);) gives the following result:
<object id="mp3player_1" … <param value="soundFile=http://clearos.lan/test_01/?q=system/files//test_01//var/www/audio/admin/ringo_01.mp3&playerID=mp3player_1" name="flashvars"></object>P. S. The filefieldmp3player.module doesn’t give the right address either when the file system is set to private
Kind regards
Comment #2
hcabalic commentedUsing:
$audio_url = file_create_url($file);
Actually works for me with my file system set to private.
It doesn't work when set to public
Comment #3
jdelaune commented#356253: MP3 Player stopped showing the Player Duplicate and fixed.