Jump to content
Search Community

VideoLoader not firing complete event if autoplay is false

jstarrdewar test
Moderator Tag

Recommended Posts

Hi Jack,

 

I just updated from the 11/04 version to 1.73 (11/18) and I ran into an issue with VideoLoader. I'm not getting a complete event if autoplay is set to false, although the progress event is working fine.

 

Here is my configuration:

 

rootLoader(LoaderMax) appends several groupLoader(LoaderMax) objects which in turn append one or more clipLoader(LoaderMax) objects which append the videoLoader(VideoLoader) objects as well as various other kinds of loaders, if needed (In this case it is failing even if there is only the one videoloader). I call load() on groupLoader. I am listening for LoaderEvent.CHILD_COMPLETE on the groupLoader.

 

This all worked flawlessly in the 11/04 version. Now, when autoplay is true, I get my child complete event, but of course it causes all of the preloaded videos to play at the same time, which is no good. If autoplay is false, which is how I had it, I don't get any child complete event.

 

I tried attaching a complete listener to the videoloader directly, but it didn't seem to work either.

Link to comment
Share on other sites

Hmm....I just triple-checked and the COMPLETE event seems to be getting dispatched just fine. I tried a standalone VideoLoader as well as putting it inside a LoaderMax queue. Both worked flawlessly. Can you post a really simple example so that I can see the problem reproduced in context? That'd be SUPER helpful.

Link to comment
Share on other sites

I'm having a similar problem, occurred immediately after updating to 11/19 v1.731, but autoPlay isn't having any effect.

 

private function processXML(e:Event):void {
//XML stuff
for (var i:int = 0; i < 5; i++) {
	var vidLoader:VideoLoader = new VideoLoader(links[i], {name:"video" + i, container:vidStage, autoPlay:false, smoothing:true, centerRegistration:true, x:0, y:0, alpha:0, deblocking:5, checkPolicyFile:true, onProgress:progressHandler, onFail:failHandler, onComplete:completeHandler});
	vidLoader.load();
	vidLoader.addEventListener(VideoLoader.VIDEO_COMPLETE, vidfinished);
	vidArray.push(vidLoader);
}
}
function progressHandler(e:LoaderEvent):void {
orangeBar.scaleX = (vidArray[0].progress * 0.18) + (vidArray[1].progress * 0.18) + (vidArray[2].progress * 0.18) + (vidArray[3].progress * 0.18) + (vidArray[4].progress * 0.18) + 0.1;
}
function completeHandler(e:LoaderEvent):void {
trace("loading complete");
loaded++;
if (loaded == 5) {
	for (var i:int = 0; i < 5; i++) {
		vidArray[i].gotoVideoTime(10, false, true);
	}
	thumbnailTimer.start();
}
}

 

I should be seeing "loading complete" pop up in the output window as the loaders finish, but it remains empty.

My progress bar fills up as it's supposed to, and I'm not seeing any other errors.

Link to comment
Share on other sites

You guys are killin' me! Please could either one of you post a file or give me specific instructions for reproducing the issue? I just tried using your code (although you didn't post all your code - a bunch was missing and can't really apply in my file) and it worked flawlessly every time. Zero problems. I'm not saying there's not a bug/problem - I'm just saying it's VERY difficult to troubleshoot blind. I'm as anxious to figure out the problem as you are (if not more), but I've gotta be able to see it in order to diagnose things. Can you post a simple example that reliably reproduces the problem? No need to post your production files - just create the most simple example possible in a separate FLA and post it here (zip it first). Include your video if you don't mind (or have the FLA point at a remove URL where the video is)

 

Pretty please?

Link to comment
Share on other sites

Sorry Jack,

 

Deadlines were looming, so I just had to revert the library and didn't have time to break out the problem code for you (I only upgraded because I wanted to use the addCuePoint function). I was hoping the description would be enough to go off of. Anyway, your latest version (1.741) fixed the issue. Thanks a million for your rapid response, as usual!

 

Oddly, in the release notes it says the problem affects Player 9, but I am building against Player 10 with Flash Builder and Flex 4.0 and testing in Player 10.1, so it could have something to do with my specific videos, but the problem persisted past Player 9.

Link to comment
Share on other sites

But you're saying that v1.741 does fix the issue in your project, right? Regardless of whether or not you publish for FP10, 10.1, or 9? I'm not saying you need to check every player version - I just wasn't clear if you were saying that you think there's still a problem in v1.741.

Link to comment
Share on other sites

You guys are killin' me!

 

Yeah, sorry... left work and went home for the weekend... I do that sometimes ;)

Didn't want to post all of my code cause it's an 800-line mess and sort of confidential at the moment; didn't have time to build a simpler example, either.

I'll keep that in mind for next time, though.

 

New release is working just fine!

FYI, I'm publishing for FP9 out of Flash CS3.

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