These are a couple WIPs of projects that might be useful to some (desktop, mostly) developers.
is an HTML UI engine. The attached library lets you stuff a little web canvas (an object along the lines of what graphics.newTexture()
gives you) onto a display object, approximating a webview.
At the moment this only supports some mouse events. Adding other events looks straightforward, if a bit
time-consuming. Honestly, I'm not sure how I'll devote much more attention to this project (Awesomium itself hasn't updated in quite some time; I also got the impression Windows webviews are on Corona's radar, e.g. based on some hints dropped on the last After Dark), but maybe what's here already would be usable to some.
This is Windows-only.
is the core engine and the interface to the multimedia framework on which VLC media player is based."
This one follows a similar design. A video is fed through another display object.
I'm more likely to see this one through. So far there are only Windows and OSX builds, though in this case it's just because I haven't gotten to anything else. An obvious first step will be making its rather provisional API more like Corona's video objects
, then fleshing it out some. (I'm not sure how much work it would take to get something that was reasonably complete. Quite a lot of the VLC API seems targeted toward its use as a self-standing media player, from what I can see, which wouldn't really be my goal.)
Both libraries operate via display objects, thus putting them in Corona's display hierarchy.
For Awesomium, it goes something like this. (I haven't touched it a little over a month, so these steps might be a bit rusty.)
Follow the installation directions here
and check that the AWE_DIR
environment variable is set up appropriately. Scroll down to the section labeled Copy files to your build distribution
. What I did was find those files in the Awesomium exe's directory and copy them into the directory of the Corona executable. (If there is a better way it would be good to know!) I don't know if I ever tested with a build, but I presume you'd do the same alongside the exe there. (And your installer should probably check for Awesomium.)
You can put awesomiumc.dll (the "c" simply avoids a clash with Awesomium's own DLL) in
<YOUR PATH TO HERE>\AppData\Roaming\Corona Labs\Corona Simulator\Plugins\plugin.
As for libVLC, what I've found so far is this:
On Windows, install VLC
and set the VLC_PLUGIN_PATH
environment variable to point to its plugins
Copy the libvlc and libvlccore DLLs to Corona's exe folder, as with Awesomium. Likewise, with a build, add those two in the same way.
Again following Awesomium's lead, add video.dll (this should probably have a better name) to the <YOUR PATH TO HERE>\AppData\Roaming\Corona Labs\Corona Simulator\Plugins\plugin directory.
I experimented with adding VLC's plugins
folder to the build in hopes of not requiring the application to be installed. What I then get is a litany of "entry point for procedure not found" errors... though if you click through them things seem to carry on fine. Not sure what's up.
I'm not certain VLC needs to be installed on OSX. In any case, go here
(this fellow's work has been invaluable, on both OSes!) and grab one of the newest releases ending with "VLC_v2.2.4_x64_osx.tar.gz"
In this case, you can go to ~/Library/Application Support/Corona/Simulator/Plugins/plugin and dump video.dylib, along with the lib folder found in the previous step's tarball.
For a build, what I did was add a Plugins folder alongside Frameworks, MacOS, etc. in the app contents and then dumped the lib folder there, along with the dylib (either renamed plugin_video or added to a plugin folder there).
(This is a lot at once, but I'd like to get it out there and see if I can get some feedback.)
I've attached my test files for the two libraries.