[Red5] netStream.send()
Dominick Accattato
daccattato at gmail.com
Tue Oct 21 07:33:14 PDT 2008
NetStream is much like NetConnection in that they both have callback
methods. They also share the a similar property called "client". You can
assign an instance to the client property and then all callback methods
execute on that instance. So:
// A container for NetStream events and callback results
public class MyClass {
// constructor
public function MyClass() {
var ns:NetStream = new NetStream();
ns.client = this;
}
// will be called when metadata is returned from the server.
// this happens because the NetStream declared "this" which refers to an
instance of MyClass.
public function onMetaData(info:Object) : void {
//TODO
}
}
On Tue, Oct 21, 2008 at 8:07 AM, huber <huberrober at gmail.com> wrote:
>
> hi all.
>
> i couldnt have understood how to use netStream.send.
>
> in publisher side i added the line after netStream.publish("video");
>
> netStream.send("onMetaData", {title:"My Title",myInfo:"extra info"});
>
> now here is my question. how will i reach the method onMetaData from the
> client side(with using as3).
>
> how can i declare the method onMetaData(actually handler) on client side?
>
> can anyone please give an example.
>
> thank you
> --
> View this message in context:
> http://www.nabble.com/netStream.send%28%29-tp20088826p20088826.html
> Sent from the Red5 - English mailing list archive at Nabble.com.
>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
--
Dominick Accattato, CTO
Infrared5 Inc.
www.infrared5.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20081021/e207f365/attachment-0001.html
More information about the Red5
mailing list