filename with blankspace
hi all,
iam pretty newb, but i got SM2 to work on my litte page.
but i cant play files with blanspaces in them...
do i really have to rename all my songs to
artist%20-%20-title ???
iam pretty newb, but i got SM2 to work on my litte page.
but i cant play files with blanspaces in them...
do i really have to rename all my songs to
artist%20-%20-title ???
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?If you can't load links with non-URL-encoded spaces, eg. <a href="my cool song.mp3">my cool song</a>, then you will need to turn the spaces into %20 at some point along the way.
One method that might work is when passing the URL to SoundManager 2, to encode it at the Javascript level. Then you can have your HTML with spaces, and you don't have to search-and-replace " " with "%20".
In this case, you can use the javascript function encodeURI().
For example,
encodeURI('Foo bar.mp3');
..
gives "Foo%20bar.mp3"
Let's say your URL is in "someURL" within the relevant function in JS, you can modify your JS that calls createSound to encode the URL for you.
soundManager.createSound({
.. other stuff ..
url: encodeURI(someURL),
.. other stuff ..
)}
If you're using one of the "play mp3 links" demos, you can modify the script where it calls soundManager.createSound() and just have it call encodeURI on the URL.
Hope that helps!
The company says
this answers the question
Loading Profile...



EMPLOYEE