Jump to content
Search Community

re-repeat video / repeat video again

emsee test
Moderator Tag

Recommended Posts

Hi,

 

I have a simple problem, which I wondered if VideoLoader has a solution to. If not, I can achieve it manually, but thought I'd ask.

 

I've got a simple video which repeats 3 times:

vid = new VideoLoader("video.flv", {name:"vid", container:this, repeat:3});
vid.load();

I call it like this:

vid.playVideo();

...but this only works once. The second time I try to play it, it doesn't play.

 

 

I tried calling it this way instead:

vid.gotoVideoTime(0);
vid.playVideo();

...but then it only plays once.

 

 

Is there any way to maintain the repeat settings?

Link to comment
Share on other sites

I see what you mean. Yeah, the repeat count wasn't updateable, but I've attached a version of VideoLoader that has a "repeatCount()" method that allows you to get/set that value. So you could do:

yourLoader.repeatCount(0);
yourLoader.gotoVideoTime(0, true);

That should start it from the very beginning and play through all iterations. Let me know if it works well for you and I can add it to the downloads

VideoLoader.as.zip

Link to comment
Share on other sites

Hi,

 

Thanks for the update, it's really helpful.

 

When I first tried it, I assumed it would set the number of repetitions to whatever value is passed. I guess it actually sets the current repetition (so if your repeat value is 3 and you set it to 1, it plays the loop twice more).

 

Do you think it would be better to have two get/setters: One to set the repeat count & one to set the current repeat?

 

Either way, I'm happy :)

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