IonDen / ion.sound

JavaScript plugin for playing sounds and music in browsers
http://ionden.com/a/plugins/ion.sound/en.html
MIT License
712 stars 154 forks source link

File name with reserved URL characters is not supported (FF 40 only) #31

Open mbratukha opened 9 years ago

mbratukha commented 9 years ago

I got this bug when had tried to use a file with name test#.mp3. Symbol # should be replaced by %23 to make a request to the server.

IonDen commented 9 years ago

Fixed in 3.0.1

mbratukha commented 9 years ago

The bug is still here, but only for Friefox (at least in ver. 40.0.2).

The file loading goes fine: image

But then it suddenly says that there is no such sound: image

Any adeas?

IonDen commented 9 years ago

Hi, i will try o check this in the end of the week.

a4jp-com commented 8 years ago

I sliced away characters from my array to get the code working on a PC.

Here is a sample of my code.

It might give you a few ideas on fixing your problem.

var thearray1 = Version[item[itemnumber]][3][0];

//remove last 4 characters
var withoutChars = thearray1.slice(0, -4);  

//remove first 12 characters
var withoutChars2 = withoutChars.slice(12);

ion.sound({sounds:[{name: withoutChars2}], volume: 1.0, path:"/ion/sounds/", preload: false});
ion.sound.play(encodeURIComponent(withoutChars2));
a4jp-com commented 8 years ago

Whoops. I just saw this was from a year ago. I'll keep the post here though. It might help someone.