Hi, I think I found a bug when I try to load a video and access to the onInit event.
I made a simple test that you can copy and paste on an as file or a fla file:
import com.greensock.loading.VideoLoader;
import com.greensock.loading.data.VideoLoaderVars;
// flv works ok, see example below:
// var _url : String = "http://cdn.liverail.com/adasset/229/331/hi.flv"
// MP4 is not OK , it si doing Two onInitEvent
var _url : String = "http://streaming.openvideoads.org/shows/the-black-hole.mp4"
var videoVars : VideoLoaderVars = new VideoLoaderVars();
videoVars.onInit(onInitEvent);
videoVars.bufferTime(3);
videoVars.allowMalformedURL(true);
// videoVars.autoPlay(false);
videoVars.autoAdjustBuffer(true);
videoVars.container(this.stage);
var videoLoader : VideoLoader = new VideoLoader(_url,videoVars);
videoLoader.load();
function onInitEvent(event:Event) : void {
trace("onInitEvent")
}
As you can see if I use the URL that has a FLV file, the onInitEvent is fired 1 time
But if I use the URL that has a mp4 file, the onInitEvent is fired 2times !!!
I test this isue with a previous version on greensock and with the latest version (just downloaded) and I get the same result.
Any ideas?
Thanks
Rodrigo