# US$1000 Bounty OpenFL/Lime to play video in IOS and Android

**URL:** <https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441>\
**Category:** Job Postings\
**Tags:** android, ios, openfl\
**Created:** [May 16, 2020, 12:16am UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441 "2020-05-16T00:16:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruno](https://avatars.discourse-cdn.com/v2/letter/b/c77e96/32.png) [@bruno](https://community.haxe.org/u/bruno)\
**Post date:** [May 16, 2020, 12:16am UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/1 "2020-05-16T00:16:40Z")

</div>

Hello, Haxe Community!

I am offering US$500 Bounty for OpenFL/Lime support for IOS and Android.

OpenFL API Reference shows openfl.media.Video and openfl.net.NetStream.play(). We need to have iOS/Android native video for OpenFL.

Basically, having video support on iOS and Android, and being able to use the classes openfl.media.Video and openfl.net.NetStream.\* to play a video.mp4 file like we were used to do with Flash/ActionScript 3.

According to Joshua (OpenFL singmajesty), the founder of OpenFL:

“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.”

The bounty is $250 for iOS and $250 for Android to implement (native) video support in Lime.

Hopefully you will also be interested to share that with the community, and hopefully spear-head that effort, as mentioned by Josh.

Initial discussion on this at:

> **[Does OpenFL/Haxe play video in iOS & Android?](https://community.openfl.org/t/does-openfl-haxe-play-video-in-ios-android/12327/10)**
>
> 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...

Thanks!

Bruno

---

<div class="post-metadata">

**Author:** ![nanjizal](https://community.haxe.org/user_avatar/community.haxe.org/nanjizal/32/239_2.png) [@nanjizal](https://community.haxe.org/u/nanjizal)\
**Post date:** [May 17, 2020, 4:01pm UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/2 "2020-05-17T16:01:03Z")

</div>

Bruno  
Surely you can use Webm on Android and iOS

> **[soywiz/haxe-openfl-webm](https://github.com/soywiz/haxe-openfl-webm)**
>
> NME haxe extensions for decoding webm videos (mkv+vp8+vorbis).

Perhaps inspired by my FITC talk at trying to hook WebM ( vpx c++ ) up to NME, was rather a failed talk as struggled with 32/64 issues on mac, and generally at giving talks, and only got as far as reading frame numbers into NME, I had never tried any c before then, but I think I entertained thew with some divtastic experiments.  
Anyway apparently there is a problem with soywiz webm decoder in that video will run out of images, the image class has a version that increments with new images and eventually runs out - surprised as it seems odd as an Int should be plenty ( just /60/60/60 still reasonable number of hours! ), but maybe it’s for all images and double buffering etc…  
But I am sure changing the ‘version’ property in the Image class to a Float would surely help in a large way, or just creating a new static method that uses an image variant that has ‘version’ property defined as a Float.  
Float on c++ value max typically = 9007199254740992 after that it can’t increment in +1 steps.  
Int on c++ value max = 2147483647  
So just switching to a float and it becomes 4194304 times bigger, the maximum on hashlink is smaller by a factor of 10?  
You can find details of Min / Max values for haxe here:

> <https://github.com/skial/min-max/blob/master/src/be/Constant.hx>

You can find details of Lime version++ aspect here:[lime/ImageDataUtil.hx at master · haxelime/lime · GitHub](https://github.com/haxelime/lime/blob/master/src/lime/_internal/graphics/ImageDataUtil.hx#L1206)

Obviously WebM is not ideal but certainly it seems a viable approach, since most decoders apart from WebM have licenses that are either commercial or GPL so the only way round is to use native Java or native Obj-C code. But then you have to transfer the video frames between haxe and the native platform which is likely going to be heavy unless you setup pointers or something which then could be very risky, memory volatile.

What is the objection to haxe-openfl-webm, it should be feasible to improve integration. The version property of Image could be changed, or use of a ‘VideoImage’ which is easy to swap data with ‘Image’. I believe this may work for HashLink or C++ target? I expect the webm code could be revisited, I believe from looking at Google’s VPX decoder code that quite a bit of the Webm is ready made and it’s just transfering pixels via cffi or newer approaches.

---

<div class="post-metadata">

**Author:** ![RobDangerous](https://community.haxe.org/user_avatar/community.haxe.org/robdangerous/32/55_2.png) [@RobDangerous](https://community.haxe.org/u/RobDangerous)\
**Post date:** [May 18, 2020, 9:22pm UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/3 "2020-05-18T21:22:19Z")

</div>

webm software decoding is a bit troublesome in regards to performance. I tried that. Kha has the code to use Android’s and iOS’s native, hardware-accelerated video-decoding. Feel free to copy it and earn some money. For Android that also requires a special fragment shader adjustment.

---

<div class="post-metadata">

**Author:** ![nanjizal](https://community.haxe.org/user_avatar/community.haxe.org/nanjizal/32/239_2.png) [@nanjizal](https://community.haxe.org/u/nanjizal)\
**Post date:** [May 21, 2020, 9:50pm UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/4 "2020-05-21T21:50:08Z")

</div>

The bounty would make more sense if it was to add WebM to hxformat, and hxformat had approaches setup specific for android and ios, I am just not convinced that building a solution for only one toolkit is ideal?

---

<div class="post-metadata">

**Author:** ![bruno](https://avatars.discourse-cdn.com/v2/letter/b/c77e96/32.png) [@bruno](https://community.haxe.org/u/bruno)\
**Post date:** [May 24, 2020, 5:56am UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/5 "2020-05-24T05:56:59Z")

</div>

Hi Nanjizal!

Thank you for your input. I am not very familiar with Webm and the solution that you presented. Does it play a video.mp4 file?

I was actually thinking about something more simple. Just pass the video location to an implementation or interface that uses the native player of iOS and Android, like OpenFL uses the HTML or Flash native player; and integrate that in Lime (as it was done with HTML and Flash players). What do you think?

Thanks!  
Bruno

---

<div class="post-metadata">

**Author:** ![bruno](https://avatars.discourse-cdn.com/v2/letter/b/c77e96/32.png) [@bruno](https://community.haxe.org/u/bruno)\
**Post date:** [May 24, 2020, 5:59am UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/6 "2020-05-24T05:59:25Z")

</div>

Hi Robert,

I appreciate that you have mentioned the Kha implementation of Android and iOS native video decoding. Please could you perhaps share a link of the code that you mentioned?

Thanks!  
Bruno

---

<div class="post-metadata">

**Author:** ![RobDangerous](https://community.haxe.org/user_avatar/community.haxe.org/robdangerous/32/55_2.png) [@RobDangerous](https://community.haxe.org/u/RobDangerous)\
**Post date:** [May 24, 2020, 1:02pm UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/7 "2020-05-24T13:02:04Z")

</div>

Android is here: [https://github.com/Kode/Kinc/blob/master/Backends/System/Android/Sources/Kore/Video.cpp](https://github.com/Kode/Kinc/blob/master/Backends/System/Android/Sources/Kore/Video.cpp)  
iOS (and also macOS) is here: [https://github.com/Kode/Kinc/blob/master/Backends/System/Apple/Sources/Kore/Video.mm](https://github.com/Kode/Kinc/blob/master/Backends/System/Apple/Sources/Kore/Video.mm)

---

<div class="post-metadata">

**Author:** ![bruno](https://avatars.discourse-cdn.com/v2/letter/b/c77e96/32.png) [@bruno](https://community.haxe.org/u/bruno)\
**Post date:** [May 24, 2020, 6:30pm UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/8 "2020-05-24T18:30:35Z")

</div>

Hi Robert,

That was very kind of you to share the Kha video implementation. Thank you very much!

I watched your presentation about cooperation of 2018, when you mentioned Kha and OpenFL. Very nice! Please could you share its status, and how to access/use it?

I am converting Flash/actionscript legacy code to Haxe (using openFL), and new projects with Kha could be interesting. I will check it out.

Thanks again!  
Bruno

---

<div class="post-metadata">

**Author:** ![bruno](https://avatars.discourse-cdn.com/v2/letter/b/c77e96/32.png) [@bruno](https://community.haxe.org/u/bruno)\
**Post date:** [May 24, 2020, 6:46pm UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/9 "2020-05-24T18:46:05Z")

</div>

Hello Haxe Lovers!

The bounty is still on ($500) for Lime native video support for iOS and Android (as suggested by OpenFL’s creator, Joshua). In addition, Kha’s creator, Robert Konrad, was very kind to offer Kha’s implementation to “copy/adapt in Lime” and showed the code:

"Android is here: [https://github.com/Kode/Kinc/blob/master/Backends/System/Android/Sources/Kore/Video.cpp](https://github.com/Kode/Kinc/blob/master/Backends/System/Android/Sources/Kore/Video.cpp)

iOS (and also macOS) is here: [https://github.com/Kode/Kinc/blob/master/Backends/System/Apple/Sources/Kore/Video.mm](https://github.com/Kode/Kinc/blob/master/Backends/System/Apple/Sources/Kore/Video.mm) "

Please let us know if you are interested.

Thanks!  
Bruno

---

<div class="post-metadata">

**Author:** ![RobDangerous](https://community.haxe.org/user_avatar/community.haxe.org/robdangerous/32/55_2.png) [@RobDangerous](https://community.haxe.org/u/RobDangerous)\
**Post date:** [May 24, 2020, 11:19pm UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/10 "2020-05-24T23:19:23Z")

</div>

Oh, I kind of gave up on cooperation. Still open to it but I don’t think the guy who only does those Haxe things in what little free time he has left next to his two full-time jobs is the right person to push that forward.  
That said, the thing is at [GitHub - Kode/openfl](https://github.com/Kode/openfl) - it works with the exception of vector graphics but it sits on an old version of openfl because its internals have been changed around again shortly after. A test project which can be build like any other Kha project ist at [GitHub - Kode/OpenFLTest](https://github.com/Kode/OpenFLTest)  
I recently started again on working on the missing vector graphics support, that’s happening at: [GitHub - RobDangerous/nanovg: Antialiased 2D vector drawing library on top of Kha for UI and visualizations.](https://github.com/RobDangerous/nanovg)

---

<div class="post-metadata">

**Author:** ![bruno](https://avatars.discourse-cdn.com/v2/letter/b/c77e96/32.png) [@bruno](https://community.haxe.org/u/bruno)\
**Post date:** [May 25, 2020, 7:29pm UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/11 "2020-05-25T19:29:02Z")

</div>

Hi Robert,  
That’s good news on the vector graphics support. I hope that works out well.  
Good luck!  
Bruno

---

<div class="post-metadata">

**Author:** ![bruno](https://avatars.discourse-cdn.com/v2/letter/b/c77e96/32.png) [@bruno](https://community.haxe.org/u/bruno)\
**Post date:** [May 27, 2020, 12:06am UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/12 "2020-05-27T00:06:30Z")

</div>

Hi Robert,

Got more contribution from other sources. The bounty now is $1000 to get native video support for iOS and Android in Lime. Would you like to do it and get the next generation SuperNintendo or whatever cool video platform is out there?

Please let me know if you would like to talk about it. My skype is brunok3 - or indicate another way to communicate directly if you prefer.

Thanks!  
Bruno

---

<div class="post-metadata">

**Author:** ![RobDangerous](https://community.haxe.org/user_avatar/community.haxe.org/robdangerous/32/55_2.png) [@RobDangerous](https://community.haxe.org/u/RobDangerous)\
**Post date:** [May 27, 2020, 12:35am UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/13 "2020-05-27T00:35:48Z")

</div>

Hm, I’m confused that nobody wants to tackle it, I thought I provided all the pieces. But if that’s the case and if it has time until late June (just finishing up something else right now) I’ll take care of it.

---

<div class="post-metadata">

**Author:** ![bruno](https://avatars.discourse-cdn.com/v2/letter/b/c77e96/32.png) [@bruno](https://community.haxe.org/u/bruno)\
**Post date:** [May 27, 2020, 4:42am UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/14 "2020-05-27T04:42:30Z")

</div>

Hi Robert,  
That sounds good.  
Thanks,  
Bruno

---

<div class="post-metadata">

**Author:** ![rationaldecay](https://avatars.discourse-cdn.com/v2/letter/r/e9c0ed/32.png) [@rationaldecay](https://community.haxe.org/u/rationaldecay)\
**Post date:** [July 14, 2020, 3:30pm UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/15 "2020-07-14T15:30:29Z")

</div>

Hi @RobDangerous !  
I was wondering if you had working on it.  
If it’s not the case, maybe I’ll try to do it. But I’m not such a good programmer and have far less experience than you , so I’ll try it if only you don’t have the time to do it and haven’t started yet 🙂

---

<div class="post-metadata">

**Author:** ![RobDangerous](https://community.haxe.org/user_avatar/community.haxe.org/robdangerous/32/55_2.png) [@RobDangerous](https://community.haxe.org/u/RobDangerous)\
**Post date:** [July 14, 2020, 3:47pm UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/16 "2020-07-14T15:47:55Z")

</div>

Oh, actually got started on that last week and want to finish it before the end of the month (although not sure about that, still in CrossCode launch chaos). Sorry.

---

<div class="post-metadata">

**Author:** ![rationaldecay](https://avatars.discourse-cdn.com/v2/letter/r/e9c0ed/32.png) [@rationaldecay](https://community.haxe.org/u/rationaldecay)\
**Post date:** [July 14, 2020, 4:56pm UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/17 "2020-07-14T16:56:33Z")

</div>

No worries 🙂

---

<div class="post-metadata">

**Author:** ![jgedri](https://community.haxe.org/user_avatar/community.haxe.org/jgedri/32/1322_2.png) [@jgedri](https://community.haxe.org/u/jgedri)\
**Post date:** [August 28, 2020, 1:13am UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/18 "2020-08-28T01:13:05Z")

</div>

How do I get hold of the test project’s dependencies?

---

<div class="post-metadata">

**Author:** ![loudo](https://community.haxe.org/user_avatar/community.haxe.org/loudo/32/109_2.png) [@loudo](https://community.haxe.org/u/loudo)\
**Post date:** [December 16, 2020, 8:08am UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/19 "2020-12-16T08:08:19Z")

</div>

Hi! Any news on this? 🙂

---

<div class="post-metadata">

**Author:** ![RobDangerous](https://community.haxe.org/user_avatar/community.haxe.org/robdangerous/32/55_2.png) [@RobDangerous](https://community.haxe.org/u/RobDangerous)\
**Post date:** [December 16, 2020, 8:29am UTC](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441/20 "2020-12-16T08:29:33Z")

</div>

No, somehow still busy doing various CrossCode things. If somebody wants to jump in before I get to it that’s now fine by me.

[Next page](https://community.haxe.org/t/us-1000-bounty-openfl-lime-to-play-video-in-ios-and-android/2441.md?page=2)
