Mel
Mel

Reputation: 1

bytearray from a webcam

i try to get a bytearray from a webcam. i can get the image of the webcam, copy it to bitmapdata and get the bytearray. but is it possible to get the bytearray from the image and sound from the client's webcam ?

Upvotes: 0

Views: 1015

Answers (2)

daleyjem
daleyjem

Reputation: 2674

if i had the rep, i'd thumbs up www0z0k's reply... should help me with my own app.

Mel, however you're planning on processing the ByteArray on the server (i'd assume something with NetConnection.send()), i'd be sure to ByteArray.inflate()/ByteArray.deflate() your data transfer.

Upvotes: 0

www0z0k
www0z0k

Reputation: 4434

audio data to ByteArray:
* Microphone.sampleData Event
* SoundMixer.computeSpectrum() method

i know only the following way to get a ByteArray from Video instance:
* to draw a BitmapData each time the screen is updated and then BitmapData.getPixels(new Rectangle(0, 0, BitmapData.width, BitmapData.height))

it's also possible to join ByteArrays with video and audio data but it depends on how it'll be treated on the server side

Upvotes: 2

Related Questions