Jump to content
Search Community

Video Loader - Stream from a set time

Chris7777 test
Moderator Tag

Recommended Posts

Hi.

 

I'm using the VideoLoader to load in a FLV movie. This part works fine, the movie loads and play's fine. I also would like to stream the video, this also works fine, but I can only stream from the start.

 

I would like to stream from, let's say 2 mins in.

 

I am doing the following:

 

vidLoader = new VideoLoader("/content/current/video.flv", {
       onComplete:onVideoLoad,
       onProgress:onVideoProgress,
   });
   vidLoader.load();    

   addChild(vidLoader.content);
   vidLoader.gotoVideoTime(120);    // 2 minutes into the vid
}

function onVideoProgress(e:LoaderEvent):void {
   loadingText.text = "Loading Video: " + int(e.target.progress * 100) + "%";
}

function onVideoLoad(e:LoaderEvent):void {
   trace("Loaded!");
}

 

The above streams the video, but only starts from the start. I can put the "gotoVideoTime" into the onComplete function, but it will only "goto" once the whole video has loaded.

 

Is there a way to start streaming from a certain point?

 

Cheers

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...