OpenLaszlo YouTube Player Demo and Source Code

I've been working on developing streaming video support for OpenLaszlo: LZX classes to support improved audio and video, including RTMP streaming via Flash Media Server (aka Flash Communication Server) and also the Red5 Open Source Flash Server, as well as streaming video via http. It supports playback of recorded FLVs, recording from camera and microphone, live two-way (or multi-party) audio/video conferencing, and FLV streaming over http.

It's easy to use the OpenLaszlo video components, because they're nicely integrated with the OpenLaszlo programming model. They expose logical attributes and events which make it easy to integrate video into OpenLaszlo applications.

To test it out the code and demonstrate its functionality, I've developed a simple YouTube Player in OpenLaszlo [click here to open it in a window]. It uses the YouTube ReST Web API, and some simple html screen scraping to get the URL parameters to stream the FLV file directly.

Here is the source for the test application wrapper that puts the YouTube video player in a resizable window, and the more interesting source for the youtubeplayer component, that uses the new OpenLaszlo video classes I'm developing (whose source is in this directory).

The new video classes and the YouTube player demo will be checked into the OpenLaszlo svn repository soon.

Here's a live demo:

Webcam Snapshot

Don, I've been playing around with the new videoview and camera in Open Laszlo. It is very easy to use, but how does the mediastream record function work? Are there any examples of that? In particular, I'm interested in taking a single snapshot (jpg?) Thanks for all the work you've put into this extension, it has so much potential. Cheers, Peter

UI playground

Foraatting this is proving difficult and the more information link didn't help me. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. I'm interested in having some easy way to try out some "humane" interface ideas, including making rollover a central feature. That would auto soom into the object to its "natural" size. That is when you can read any text there. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Gestures like loop left and loop right and perhaps rubout would be useful. Loop right is clockwise and I hope to make it the select for the smallest object which contains the cursor and the loop. Rubout would be a delete. Perhaps loop left, ie wittershins, should be the deselect. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Then select can pop up a somewhat transparent pie menu and entering the wedge highlights that choice and loop right invokes that command while crossing to another wedge mighlights it instead. Loop left would deselect the object and dismiss the pie menu. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. I believe these are all quite straightforward in OpenLaszlo and you are the pie menu guru already working in the arena already. What a wonderful state of affairs. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Will there be difficulty for a user to create and modify a new object which can accept text and image and video content from arbitrary sources and autosoom on rollover? .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. I believe that would permit a largely geographic navigation style which people are known to find easy to learn and remember. Novices have been competent and vomfortable in less that one minute of training. Computer experts in two minutes. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Pie menu choices from a set of destination windows or screens or rooms or pages seems very natural for going home or to a search screen. One might show the recent path taken through pages so backing uo several screens is quick and easy. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. A book could be presented in a 2D layout where the eight adjacent pages are accessible via doorways in each wall and corner. The animation is apparently easy to manufacture in OpenLaszlo. The door in the east wall leads to the next page. The pages could be full screen or less, I don't like more. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Did any of that make sense? Is OpenLaszlo an environment which makes such a system easy to build and deliver, even to existing browsers? Are there handy examples of things that use the needed facilities? .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. Richard Karpinski, World class nitpicker Dick@CFCL.com Put Nitpicker in subject line to get past filters.

Works in Firefox 1.07, but not IE 6

Everything works in Mozilla 1.07. I can see the interface and thumbnails in IE 6.0, but main playback doesn't work. Would love to see an upload example!

Fixed the problem, worked around IE bug.

Oops! Thanks for catching that.

Apparently IE has a bug when it comes to delivering gzip compressed downloaded content to plug-ins. If the page is compressed, then Flash get an empty results instead of the content that was actually downloaded. The YouTube viewer needs to scrape the html of YouTube's watch web page, to figure out the URL of the FLV Flash video file to play, so it fetches an html page from YouTube. Unfortunately that's compressed, so it fails on IE.

So I wrote a simple little jsp to provide a minimal YouTube query service that does all the dirty work. I just tested it, and it seems to work now (for me)! When I check the code into the Laszlo trunk, the YouTube player will be in the demos/youtube directory, along with the supporting jsp.

-Don