I had an OSMF sample running on my dev laptop with Wowza Media Server because it's OSX. I use the following line to setup an mp3 stream over RTMP: var audio:AudioElement = new AudioElement(new NetLoader(), new URLResource(new URL(selectedMediaSource)));
With Wowza, the audio is seekable, but when I change over to FMS, the file still plays but the mediaPlayer is no longer seekable so the scrub bar doesn't work. The code is based off of the ExamplePlayer sample that ships with OSMF and uses a mediaPlayerWrapper to manage visibility of the controls in the UI.
Do I need something on the server side to allow the seek function? Is this not possible over FMS? Or is there just a much better way to code this?
When you say that it's not seekable, do you mean that MediaPlayer.seekable == false? That would be surprising, as AudioElement doesn't conditionally add the ISeekable trait, it should always be present. AFAIK this should work, and there shouldn't be anything special for you to do.
Can you post a simplified code example that shows the problem?
Actually, it looks like mediaPlayer.seekable == true, but the file won't seek. The easiest way to duplicate the problem is just to use the ExamplePlayer sample and modify the 'AllExamples.as' file. You can change the URL to point to any mp3 file in an FMS streaming directory for the "Streaming Audio" example.
It seems like the easiest fix is to convert the mp3 file to an flv and the seek function works again. I would rather not convert all of the mp3 files to flv, but at least it's functional. My guess is that FMS does not send the duration of the file for the mp3 format so the player can't seek.