I'm using the OSMF MediaPlayer to play a live stream (H264 video over RTMP) being encoded by Flash Media Live Encoder. I'm encountering problems with audio playback and buffering when the encoder stops publishing the stream, and then starts publishing again. Here is the sequence of events:
1. Start publishing a new stream in FMLE.
2. OSMF MediaPlayer starts playing the stream - no issues with buffering.
3. Stop publishing the stream in FMLE.
4. OSMF player dispatches a TimeEvent.COMPLETE event, followed by a MediaErrorEvent.MEDIA_ERROR ("Stream not found") event.
5. Start publishing the stream again in FMLE.
6. OSMF starts playing back the video again, but no audio can be heard.
7. OSMF is constantly dispatching BufferEvent.BUFFERING_CHANGE events, and as a result playback is slightly choppy.
But if I create a fresh instance of MediaPlayer and run it with the stream it plays back normally again.
Anybody know what is going wrong here?