Jump to content
GreenSock

toytonic

issues with autoDetachNetStream

Recommended Posts

Hi again,

 

currently I'm trying to chain two video clips seamlessly one after another, e.g. with no rendering delay.

 

The following things are occuring to me:

 

Scenario 1: autoDetachNetStream = false, videoencoding flv

====

You do not see any rendering delay but the second video isn't actually playing visually. You only hear sound.

 

 

Scenario 2: autoDetachNetStream = false, videoencoding f4v

====

You only hear sound. No video is displayed visually.

 

with autoDetachNetStream = true everything works fine, except the render delay ;)

 

Here's some example code:

 

package
{
import com.greensock.TweenMax;
import com.greensock.events.LoaderEvent;
import com.greensock.loading.VideoLoader;

import flash.display.Sprite;

public class SimpleTest extends Sprite
{
	private var _v1:VideoLoader;
	private var _v2:VideoLoader;

	public function SimpleTest()
	{
		_init();
	}

	private function _init():void
	{
		_v1 = new VideoLoader("video_1.f4v", {auditSize: false, autoPlay: false, autoDetachNetStream: true});
		_v1.addEventListener(VideoLoader.VIDEO_PLAY, _onVideoPlay);
		_v1.addEventListener(VideoLoader.VIDEO_COMPLETE, _onVideoComplete);
		addChild(_v1.content);

		_v1.load();

		_v2 = new VideoLoader("video_2.f4v", {auditSize: false, volume: 0, autoPlay: false, autoDetachNetStream: true});
		_v2.load();

		TweenMax.delayedCall(4, _start);
	}

	private function _onVideoPlay(event:LoaderEvent):void
	{
		trace("video _play");
	}

	private function _start():void
	{


		_v1.gotoVideoTime(0, true);
	}

	private function _onVideoComplete(event:LoaderEvent):void
	{
		_v1.pauseVideo();
		removeChild(_v1.content);


		//_v2.gotoVideoTime(0, true);
		_v2.playVideo();
		_v2.volume = 1;
		addChild(_v2.content);
	}
}
}

 

Thanks for looking into it!

Link to comment
Share on other sites

actually the whole logic seems to be "completely" broken. I tested it against multiple scenarios and the behavior is totally random.

 

When I switched back to an older version of LoaderMax everything is working seemless.

Link to comment
Share on other sites

I can't seem to reproduce the problem - I tried your code and it worked perfectly for me. Zero problems. Are you sure you've got the latest version of all the LoaderMax classes? If you're still having trouble, could you post an example FLA (and support files) that can be published to view the problem? I'm very curious to see the behavior you described.

Link to comment
Share on other sites

as I said. I had a recent version in place and I could not get any smooth chaining working without a rendering delay. then I did an update on the greensock lib (which was missing the swc btw) and I had total random results in visually displaying the videos. after that I switched back to an older version of loadermax and everything's fine. All this behavior with no change on my example code...

Link to comment
Share on other sites

as I said. I had a recent version in place and I could not get any smooth chaining working without a rendering delay. then I did an update on the greensock lib (which was missing the swc btw) and I had total random results in visually displaying the videos. after that I switched back to an older version of loadermax and everything's fine. All this behavior with no change on my example code...

I'm SUPER interested in seeing this issue reproduced. It almost sounds like there's something very funky going on with your system. You didn't see the .swc in your download? Hmmm...

 

Can anyone else reproduce/confirm this issue? I'm at a loss.

 

I'd REALLY like to help you, but I'm struggling to figure out how especially since you haven't posted any files. Could you do that?

Link to comment
Share on other sites

  • 2 weeks later...

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