Media Package

This page is not complete.
Discussion can be found in mailing list. One of the threads is named "nme/neash/canvas-nme".

There are some discussion in the mailing list on the topic of grouping/creating a "media"(or "graphic" or whatever) package. The aim is to create a unified abstract front-end graphic(including sound and video?) API.

Things to consider:

  • API design/coverage
  • Bitmap vs Vector
  • HTML(div tags) vs Canvas vs SVG vs others
  • Performance on individual platform

API design/coverage

Adoption of the flash API


  • Flash is the only current package having a complete graphic(and other media) API.
  • Flash is one of the first target of haxe, so haxe developers are used to it.
  • There is nme/neash/canvas-nme that already working on providing Flash API to other targets.


  • Flash's API was not considering 3D in the first place. Difficulties may exist if we want to provide good 3D performance.
  • Flash's API is quite a lot. So more effort will be needed for developing new target of Haxe.

Minimal API


  • Less effort to develop.
  • Make developing new target of Haxe easy.
  • Easy to learn.


  • It will likely be lower-level, so a framework on top of it may be needed.
  • It will likely be 2D only.

Adoption of other common graphic API (eg.OpenGL,Processing)


  • Since the API itself is widely used(outside the Haxe world), it may attract new comer.
  • Possibly better API design consideration for 3D comparing to Flash.
  • Possible to port existing libraries/frameworks to Haxe.


  • Need Flash implementation.
  • Current Haxe user may find it unfamiliar.
  • Need to consider where should the current Flash package goes.

HTML(div tags) vs Canvas/SVG/others

Front-end for the webpage design and front-end for apps are quite different. Whether it should be separated is another consideration.

May relay on plug-ins for advanced feature.

HTML(div tags)


  • Best accessibility and usability for the end-user.
  • Best cross-browser/cross-platform support.


  • Many limitation on API functions. (eg.shapes, 3D, filters etc.)



  • More possibilities than HTML
  • Possible better performance if consider WebGL/O3D etc.


  • Poor cross-browser/cross-platform support. (eg. IE and mobiles).

version #8219, modified 2010-03-16 21:26:49 by AndyLi