[ANN] Flash/Ruby 0.1.0

L

leon breedt

Hello,

I'm happy to announce the first public release of Flash/Ruby.
Flash/Ruby is a Ruby extension wrapping a library I wrote called
"libflash" [1].

The "libflash" library provides a way to embed Macromedia (R) Flash
playback in a GTK+ application. It does this by using the Mozilla
plugin and providing a Mozilla emulation layer, much like Konqueror
does, but now you can use it in any application.

The extension's API is quite small, here is roughly all you need to do:

swfplugin = Flash::Library.new('/path/to/libflashplayer.so')
swffile = Flash::File.new(swfplugin, '/path/to/swffile.swf')
window = Gtk::Window.new(Gtk::Window::TOPLEVEL)
window.show
swffile.play(window)
swffile.pause
swffile.resume
...
Gtk::main

As the Flash plugin uses an Xt timer callback to render its frames,
and libflash integrates this with the GLib mainloop, anything that
blocks the GLib mainloop is going to block Flash playback as well. It
should interoperate decently with standard Gtk using apps though.

Dependencies:
libflash 0.99.2 or newer
ruby-gnome2 0.11.0 or newer

The ruby-gnome2 dependency comes about because of a really ugly hack
that I want to alleviate in the future. (The hack lets you pass a
Gtk::Window to swffile.play).

I haven't gotten round to setting up a RubyForge project yet, so...

Download:
http://blog.xeraph.org/software/flash-ruby/flash-ruby-0.1.0.tar.gz


Leon

[1] http://blog.xeraph.org/blog/libflash-0.99.2.html
 
L

leon breedt

Has this been tested on win32 at all?
No, sorry :(

On Win32 you can embed the Flash ActiveX object which gives you more
functionality, so it wasn't a priority to support Win32 for me. I
don't think I use anything UNIX-specific in libflash though, so if you
can get libflash working on Win32, the bindings should work.

I've only tested on Linux though.

Leon
 
L

leon breedt

I don't think I use anything UNIX-specific in libflash though, so if you
can get libflash working on Win32, the bindings should work.
Woops, scratch that, I just realized there are some things that are
rather X11 specific in my code. UNIX-only I'm afraid at this time.

I'll accept patches to do ActiveX embedding in libflash on Win32 though :)

Leon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top