Jump to content
Search Community

VideoLoader loop error

laugre test
Moderator Tag

Recommended Posts

Hi there and thx for support.

Before creating a new topic I found this one http://greensock.com/forums/topic/6567-video-stop-between-loop/
but it's not exactly the same problem.

 

I'm loading 4 different flvs (short time each between 1 and 2 minutes)  using a LoaderMax that have to repeat indefinitly (until the user stop it of course).

After a time videos stop repeating one after the other. They are well rewinded to 1st frame but seem to not be played again.

If I wait a very long time (2h repeating) the 4 videos seem to become blocked on 1st frame.

I first tried to declare repeat property as -1 like this :

m_loader1 = new VideoLoader("flv1.flv", {name:"subCol", container:m_interface.subtileScreen, repeat:-1, width:590, height:350, autoPlay:false, visible:true });
m_loader2 = new VideoLoader("flv2.flv", {name:"subJoie", container:m_interface.subtileScreen, repeat:-1, width:590, height:350, autoPlay:false, visible:true });
m_loader3 = new VideoLoader("flv3.flv", {name:"subSur", container:m_interface.subtileScreen, repeat:-1, width:590, height:350, autoPlay:false, visible:true });
m_loader4 = new VideoLoader("flv4.flv", {name:"subTrist", container:m_interface.subtileScreen, repeat:-1, width:590, height:350, autoPlay:false, visible:true });

m_loader = new LoaderMax({name:"subtile"});
m_loader.append(m_loader1);
m_loader.append(m_loader2);
m_loader.append(m_loader3);
m_loader.append(m_loader4);

m_loader.load();

I also tried to comment repeat:-1 and handle myself play and complete events for each video like this :
 

m_loader1.addEventListener(VideoLoader.VIDEO_PLAY, onVideo1Play);
m_loader1.addEventListener(VideoLoader.VIDEO_COMPLETE, onVideo1End);

private function onVideo1Play(event : LoaderEvent) : void 
{
	trace("[log] onVideo1Play " + event.currentTarget.name + " video time " + event.currentTarget.videoTime);
}

private function onVideo1End(event : LoaderEvent) : void 
{
        trace("[log] onVideo1End " + event.currentTarget.name + " video time " + event.currentTarget.videoTime);
	m_loader1.gotoVideoTime(0, true);
}

And same behaviour, onVideo1End is called that rewind video to 0s, but video is not played even if forceplay = true.
However onVideo1Play is called after onVideo1End.

I think I have something wrong... 
Could you help me please ?

 

Best,

laugre

Link to comment
Share on other sites

A bit more information.

 

In my app (AIR app) when I arrive on the 4 videos screen, I play them :

public function startVideos() : void
{
	trace("video1 time", m_loader1.videoTime);
	trace("video2 time", m_loader2.videoTime);
	trace("video3 time", m_loader3.videoTime);
	trace("video4 time", m_loader4.videoTime);
			
	m_loader1.gotoVideoTime(0, true);
	m_loader2.gotoVideoTime(0, true);
	m_loader3.gotoVideoTime(0, true);
	m_loader4.gotoVideoTime(0, true);
}

Then when I quit this screen I pause videos and goto 0s head position :

public function stopVideos() : void
{
	m_loader1.pauseVideo();
	m_loader2.pauseVideo();
	m_loader3.pauseVideo();
	m_loader4.pauseVideo();
			
	m_loader1.gotoVideoTime(0);
	m_loader2.gotoVideoTime(0);
	m_loader3.gotoVideoTime(0);
	m_loader4.gotoVideoTime(0);
}

When the problem occurs, if I call stopVideos() and then startVideos(), 

videos that was blocked stay blocked on first frame and time trace instructions (inside startVideos() function) indicate a strange value 2.067 or 2.033 instead of 0.

 

What could explain this ?

 

Best,

laugre.

Link to comment
Share on other sites

Hi,

 

Sorry to hear about the troubles. 

Can you test your app running in a browser or stand-alone Flash Player / debugger... anything but AIR?

Curious to know if this happening only in AIR apps (which we consitently hear is buggy and problematic with NetStreams and such), thanks

Link to comment
Share on other sites

Hi,

 

My app has to be an AIR app.

I solved the problem by replacing VideoLoader by FLVPlayback.

 

But I reduced my app to the simplest app to test it in a fla.

I don't have the time to do more tests with a standalone flash player but feel free to do it.

 

Here is a zip file containing test project to reproduce the bug.

The 4 flv videos are not inside (about 20Mo) but I can send to you via wetransfer.

 

Best,

laugre.

test.zip

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