Hi, I am trying to use a NetStream video but I have run into some issues.
Is it not possible to get the status of the preloading of a video in HTML5 target?
I am trying to update a bar based on the netStream but it just returns undefined.
Another way to do it, where I could actually get the bytes loaded is by using a Loader object, but it seems that it is not possible to play the file after that? I might have misunderstood but doesn’t that load the file twice? (Loading the file via Loader object and then running NetStream.play(url-to-file))
Can someone push me in the right direction?
I would expect this to use NetStream, but perhaps a few things are not wired up. Maybe it needs hooks to dispatch events while the video preloads?
Thanks, that is probably the case. Does that mean that I have to work in the OpenFL source code to get it working or can it be done inside my own project?
I have an eventListener on my netStream that should react on NetStatusEvents, but it never fires.
OK, I realized that I did an error by connecting the NetStatus event to the NetStream and not the NetConnection object, so now it’s firing when the video starts playing. ~I was looking at an example that attached it to the NetStream and not the NetConnection for some reason.
Huh, maybe we need to dispatch from both. I tested video on HTML5 (and it worked!) but I wasn’t using events, personally.
If you have ideas for improvements, the source shouldn’t be too scary: