Hi Don,

Congradulations!

About the dynamically generating flv files on the server there are  2 options that I know of. I read on the laszlo board once that ffmpeg somehow supports flash video and I found this post on it
http://open4all.info/ossa/_Live_Flash_Stream_via_FFMPEG

And the red5 project that I mentioned before is really interesting.
http://www.osflash.org/red5

What it enables (that I am most interested in) is access to flash's camera and microphone objects. So anyone with a web camera and the flash plugin can participate in audio chat. The reason why this is tricky is that MM wrapped the streaming flv files in a proprietary protocol called rtmp.

Red5 isn't at all stable yet, and they want to do much more than that, but they have managed to provide access to the audio and image streams from the camera and microphone, which is the main step for easy realtime capture.

Congrats again,

-Cort


On 3/1/06, Don Hopkins <[EMAIL PROTECTED]> wrote:

Warning: This message has had one or more attachments removed (movietest.lzx.swf). Please read the "WarpOMatic-Attachment-Warning.txt" attachment(s) for more information.

Hurray, and thanks for the help!!!

 

I finally got it to work, by using swfmill to compile that xml file which makes a movie with just a video player, then dynamically loading the resulting tiny swf file into the resource of a view, then fishing out the videoObj inside the clip, then doing all that other stuff with it!

 

I compiled the movie-swfmill.xml into movie-swfmill.swf by downloading swfmill and running:

swfmill xml2swf movie-swfmill.xml movie-swfmill.swf

 

(Both are included in this email so you don't need to do that yourself.)

 

Put movie-swfmill.swf in the same directory as movietest.lzx, inside your laszlo directory, then open its url, with debug=true so you can see the status messages. It works fine as a solo app, too!  

That has one view, whose oninit dynamically loads the movie-swfmill.swf stub containing the magic DefineVideoStream instruction, which makes a video object called "videoObj".

The magic video object shows up on our view as this.__LZmovieClipRef.lmc.videoObj, and we can do the usual documented stuff with the NetConnection and the Stream to make it play a flv file, even from another server!

Fiddler tells me it didn't try to fetch the crossdomain.xml from huffingtonpost.com where I loaded the video from, so hopefully that isn't an issue with flv files.

 

Yipee!!! Flash is confusing, but OpenLaszlo sure rocks!

 

Now, does anybody know how to dynamically generate an flv file on the server???!

 

            -Don

 

<canvas

  width="100%"

  height="100%"

  proxied="false"

>

 

  <view id="gMP"

    width="${parent.width}"

    height="${parent.height}"

    stretches="both"

  >

 

    <method event="oninit"><![CDATA[

        Debug.write("oninit loading movie...", this);

        this.setSource("http:movie-swfmill.swf");

      ]]>

    </method>

 

    <method event="onload"><![CDATA[

            Debug.write(

              "onload",

              this,

              this.__LZmovieClipRef,

              this.__LZmovieClipRef.lmc,

              this.__LZmovieClipRef.lmc.videoObj);

            this.connection = new NetConnection();

            this.connection.connect(null);

            Debug.write("connection", this.connection);

            this.stream = new NetStream(this.connection);

            this.stream. {

              Debug.write("onstatus", this, info, info.level, info.code);

            }

            Debug.write("stream", this.connection);

            this.videoObj = this.__LZmovieClipRef.lmc.videoObj;

            Debug.write("videoObj", this.videoObj);

            this.videoObj.attachVideo(this.stream);

            this.stream.play(" http://images.cf.huffingtonpost.com/video/MaherCheney.flv");

      ]]>

    </method>

 

  </view>

 

</canvas>

 

 



_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Reply via email to