I tried the PlayingVideo example of the openfl package, but it does work in iOS (even after some tweeking attempts). I just get a white screen. Do I miss something here?
OpenFL API Reference shows that openfl.media.Video and openfl.net.NetStream.play() are “Available on all platforms”. From searching in the Internet and forums, iOS/Android native video for openfl (and Haxe) seem to be a big roadblock for a lot a people in many years, and it is not clear if that has been solved.
Was anybody able to get video playing in iOS & Android? What did you use, NME with StageVideo, WebM, openfl workaround, …? How did you do it?
I really appreciate if you could share your workflow for video for iOS/Android. I am sure that many developers will love to here from you too!
Thanks!
Bruno
=======
Commands that I used for PlayingVideo example:
openfl create PlayingVideo
cd PlayingVideo
openfl test ios
This builds the project all right. The works on the attached iPhone to the Mac and simulator. I am able to place traces and breakpoints in xCode. All good, but it does not seem to get the events netStream (e.g. netConnection_onNetStatus_dyn). Nothing appears on the white screen. I tried both local .mp4 and remote .mp4, but it does not play.
Hi Loudo, I tried and was able to get openfl to play video with HTML5 and Flash, but I also need native iOS and Android. I have not tried NME with StageVideo yet, because I would prefer to adopt openfl in our projects instead of moving to NME, but I may need to try that path… Thanks!
Hi Dimous, building ffmpeg in OpenFL is a great idea, and that seems possible on the business side based on the links that you posted. That will be indeed a great addition to OpenFL. Thanks!
One thing that I don’t understand is why OpenFL/Lime does not make use of the video playing capabilities inherent in each platform (iOS/Android). That is free to use because Apple/Google has already the license for the codes, etc. For mobile, which is really important, using iOS/Android existing libs that could be a great solution…
To ensure the conditions of the FFmpeg license are met, without forcing OpenFL projects into the GPL/LGPL license, it must be referenced as a separate binary (dynamically linked library for example).
I’ve used FFmpeg in the past as a native process (executable external to my app), to avoid that issue. That was for encoding purposes only though.
Hi Bink, thanks for your post. Yes, tit would be great to use a separate lib and somehow use the capabilities of a video player - perhaps using an haxe extension - and hopefully leveraging the native video playing capabilities.
I wonder if somebody in the community was capable of doing that - for example implementing a haxe extension to play video using a native framework of iOS or Android. Anybody?
OpenFL uses the browser on HTML5 or currently Lime on native/mobile platforms to implement lower-level features such as video support.
Once Lime has video support OpenFL can support it quite quickly. Happy to discuss video support in Lime and work with anyone spear-heading that effort.
to that effect Lime has a version of webm compiling but no API to support it yet
Thank you for post! I have been out to adapt to the new normal. Back now
Your idea to add video support in OpenFL/Lime is very good. Not sure if somebody volunteered, but I am willing to offer a Bounty of $500 for a prototype of video support for iOS and Android, as you mentioned, and hopefully find a volunteer and get this video support as an ongoing development. Maybe advertising in Jobs of the Forum.
How does the bounty usually work in the OpenFL Forum/Community? Do you know of a good post for reference to describe the bounty? Any other recommendations?
See previous issue for reference – https://github.com/skial/haxe.io/issues/753
Short description and a link to https://community.openfl.org/t/does-openfl-haxe-play-video-in-ios-android/12327/12 should be enough.
I am getting more contribution to get this done. In fact, it seems that we can have up to $1000 in total. I am updating the bounty offer soon, posted in this OpenFL forum and Haxe forum.