all groups > macromedia flash flashcom > may 2007 >
You're in the

macromedia flash flashcom

group:

Sending XML messages inside the video stream


Sending XML messages inside the video stream akavish NO[at]SPAM gmail.com
5/4/2007 9:21:27 AM
macromedia flash flashcom:
Hi

We are evaluating the Flash Media Encoder/server as a replacement for
Windows Media but I'm still looking for the following capability that
is required for our application:
I need a way to embed small XML messages inside the video stream, just
like embedding script events in Windows Media.
I need the ability to add these messages to the video stream and get
them on the client side in the same place within the stream

Anyone know of such a feature in flash

Thanks

Eran
Re: Sending XML messages inside the video stream Kwint
5/8/2007 8:10:02 AM
Yes, I do exactly that. Using NetStream.send(), you can insert data
into the stream:

function send_xml(xml_data) {
event_type="xml_send";
//"stream_event" is the name of the event handler, event_type and
xml_data are arbitrary paramaters that the event handler function can
receive and process
publish_ns.send("stream_event",event_type,xml_data);
trace('sending event:' + event_type + '&param='+xml_data);
}


[quoted text, click to view]

Re: Sending XML messages inside the video stream Kwint
5/8/2007 8:13:13 AM
Yes, Flash can do that, I use that technique myself.

NetStream.send(handler_name,data1,data1...)

handler name is the name of the function that fires when data is
received in the NewStream, data1,data2, etc are data that are passed
in the stream, and are received and processed by the function
handler_name

So you can just send() your xml data, and have handler_name parse
it...


[quoted text, click to view]

AddThis Social Bookmark Button