• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Scripting FLVPlayback 2.5 for DVR

New Here ,
Feb 25, 2009 Feb 25, 2009

Copy link to clipboard

Copied

So, I'm working on an application that uses the DVR functionality of FMS 3.5, and am stuck.

The publishing side of the system is working fine, and I can get a very simple playback working as well (by connecting to the FMS app, attaching a NetStream to my Video object, and calling ns.play(streamID, 0, -1).

However, I need a rich UI to control the video playback. The FLVPlayback component looks like it would fit the bill nicely, but I can't get it to connect to my stream. I've tried hardcoding all the parameters via the Component Inspector in Flash CS4 to play back a specific stream I've recorded, and all I get is a never-ending buffering bar.

What I really need to do is instantiate an FLVPlayback component via AS3 and attach a NetStream to it. Or, at the very least, connect it to a DVR-enabled stream and then script some controls (e.g. jump-to-a-specific-offset).

Is there an easy-to-follow guide to doing this, or could anyone give me the 2-minute rundown?

Many thanks!
-Dan

Views

2.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Feb 25, 2009 Feb 25, 2009
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 speci...

Votes

Translate

Translate
Guest
Feb 25, 2009 Feb 25, 2009

Copy link to clipboard

Copied

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.

HTH,
Jody

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 25, 2009 Feb 25, 2009

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 25, 2009 Feb 25, 2009

Copy link to clipboard

Copied

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().

Jody

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 25, 2009 Feb 25, 2009

Copy link to clipboard

Copied

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?

d

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 27, 2009 Feb 27, 2009

Copy link to clipboard

Copied

Hi Dan,

Could be a bug -- I passed this thread to an eng who'll probably be checking in later.

Jody

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 27, 2009 Feb 27, 2009

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 09, 2009 Mar 09, 2009

Copy link to clipboard

Copied

LATEST
Any idea when the next build will be appearing?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines