This content has been marked as final. Show 7 replies
Did you download the FLVPlayback 2.5 component? The 1.0 version doesn't support DVR playback. You can get v2.5 from http://www.adobe.com/go/fms_tools
The download includes docs and a sample mxml file.
Yep, hence the title of my post, "scripting FLVPlayback 2.5" :) I've never used Flex, and want to do my UI design in Flash CS4, though, so the MXML file isn't of much help to me.
Is there some way to attach a NetStream object to the FLVPlayback component? If so, that's what I'd ideally like to do.
Oh sorry about that, I didn't see the title.
First off, you can't play DVR streams with FLVPlayback 2.5 without the DVRCast application -- and we haven't released it yet. That should have been clearer in the docs and I'll get them updated.
But you can play a NetStream -- have you checked out the API docs for FLVPlayback 2.5 -- they install locally when you download the component. The class you want to look at is FLVPlayback. Set the NetConnection.connect() info in FLVPlayback.source and specify the stream in FLVPlayback.play().
Aha, Got it. Setting the source and then calling play() with no params worked like a charm. Actually, it appears to be playing a DVR stream just fine... I set vidPlayer.isDVR = true; vidPlayer.dvrFixedDuration = false; vidPlayer.dvrIncrement = 30; vidPlayer.dvrIncrementVariance = 60; and then set the source and called play(), and voila!
The only issue now is that the Seek bar doesn't update if I'm viewing a stream that's still being recorded, so I wind up with the seek bar only 'referring' to the video that had already been recorded when I first started viewing the stream; for all subsequent video the scrub head just sits at the end of the bar. Is there a way to force the seek bar to update with the most recently known video duration?
Could be a bug -- I passed this thread to an eng who'll probably be checking in later.
The seek bar will automatically update itself when you enable DVR and play back from the DVRCast application. Also, the dvrIncrement should always be larger than the dvrIncrementVariance. The variance is the difference between what is playing and what is the actual or estimated total duration of the stream. The increment is how much gets tacked onto the current duration when the total duration is unknown. Ideally, you would use larger numbers for this too since they are in seconds. For short streams, (like half hour or less) incrementing by 300 with a variance of 120 should be fairly sufficient. The component also has it's own mechanisms for estimating the duration of the stream without having to regularly poll the server for that information.
There are also a number of fixes with regard to the behavior of the seek bar in DVR coming with the next build of the FLVPlayback 2.5.
Any idea when the next build will be appearing?