Updated to the latest version of OpenFL and then used openfl create PlayingVideo to make sample folder. Did a build html5 for each video type, mp4, webm and ogv in macOS and …
Firefox: played the mp4 fine with audio, webm and ogv didn’t display anything
Safari: showed the first frame of mp4, no video or sound, webm and ogv didn’t display anything
Chrome: didn’t display anything
We didn’t do a release of openfl-samples by accident, but I’ve just helped release an update now.
We had to make a patch to PlayingVideo, as more browsers are not playing video unless it occurs as the result of a user action, so the PlayingVideo sample should consistently require a click or tap before playing a video
Try updating your “openfl-samples” library, then openfl create PlayingVideo again before testing
I discovered that you can create everything needed to display the video after a user event like clicking a button. I made my own VideoSprite class that will load and play a video inside the sprite. The sprite can be sized and positioned as desired.
I do have a couple of issues:
If I pass an invalid path to netStream.play, netStream_onAsyncError doesn’t catch it. How do I catch this error?
I wanted to load a video and stop at the first frame. I was able to detect when the video started and tried using the seek method to advance to particular point in the video. The seek method doesn’t seem to do anything.
Take a look at the source for openfl.net.NetStream
It might be possible that some minor improvements will be needed to support what you’re looking to do, as the behavior of browsers tends to change a bit over time and require additional testing to get perfect