Search code examples
arraysred5

Red5 - how to send ByteArray data


I have done below and it works well,

// send ObjectData to client
((IServiceCapableConnection)iConnection)
     .invoke(clientSideMethod, someObjectData);

But I have no idea that If I want to send compressed ByteArrayData, which mehod should I invoke?

Could someone give me some idea?


Solution

  • You can use the method that you're already using or some of the other available methods such as onImageData. Just make sure you use the ByteArray class and have AMF3 selected for your NetConnection when you connect.

    Here is an AS file that shows how to use the onImageData method: http://red5.googlecode.com/svn/flash/trunk/player4/src/Main.as