When using the NetStream.play(url, start, duration) method to play a smaller
segment of a larger video stream from Media Server 2, the pause method appears
not to work correctly. The first time it is called, it will pause, but
subsequent calls do not restart the playback.
This happens only when using a start parameter > 0. If using the more common
scenario where playback is started from the beginning (start == 0), the pause
function works as documented. A code example is below. If anyone could
confirm/unconfirm this and/or direct me to a more appropriate support avenue,
it would be much appreciated. I'm using Flash 8, On2 encoded FLV file, RMTP
protocol, FLVPlayback Components Update 1.0.1, and Media Server 2.0.2 - 2.0.3.
As would be expected, this problem is also evident using an extended version
of the FLVPlayback control. (The FLVPlayback control has to be customized to
verify the problem because, by default, it does not support a non-zero start
time. This is a big oversight in the FLVPlayback component's design in my
opinion.)
Example code to replicate the problem:
[Q]var nc:NetConnection = new NetConnection();
nc.connect(mediaServerUrl);
ns:NetStream = new NetStream(nc);
//This line starts the video 1000 seconds in to the FLV, but breaks
pause/unpause.
ns.play(videoUrl, 1000, 120);
//This line does not break pause/unpause.
//ns.play(videoUrl, 0, 120);
//Call pause every few secs, which should alternate between pause and play
setInterval(doPause, 5000);
test_video.attachVideo(inStream_ns);
function doPause():Void
{
inStream_ns.pause();
}[/Q]