I'm working on a web application that is using SoundManager2. After beating my head against a wall and not getting my music to stream, I finally switched some of my URL's when creating a new SoundManager sound.
This is what I was using before and although it would connect, the stream would never play.
soundManager.createSound({
id: 'songId_1',
serverURL: 'rtmp://s3s5uvbmfjq6k1.cloudfront.net:1935/cfx/st',
url: 'hihi.m4a',
onconnect: function(connected){
alert(connected);
}
});
Once I changed it to this however, it all of a sudden was able to stream.
soundManager.createSound({
id:'test3',
serverURL:'rtmp://s3s5uvbmfjq6k1.cloudfront.net:1935/cfx/st',
url:'mp4:hihi.m4a'
});
I don't understand why the first one does not work and the second one does. I don't have a problem with the serverURL being hardcoded but the url is dynamic and can be any number of audio formats, so having to convert that to a valid value that will stream doesn't make sense to me unless there is an API to do so (I didn't see one in Cloudfront). Is there a way to convert
song location/song name.ext
into it's correct url for streaming or do I need to use a different player?