leapmotion / leapjs

JavaScript client for the Leap Motion Controller
https://developer.leapmotion.com/leapjs
Apache License 2.0
2.01k stars 447 forks source link

Image API #186

Open logotype opened 10 years ago

logotype commented 10 years ago

Hi

Is there any plans to implement the Image API through WS?

BR, Victor

pehrlich commented 10 years ago

Transferring the images, raw, requires a pretty high data rate - around 17Mbyte/sec. Initial tests with sending data over the websocket were prohibitively slow.

WebRTC data streaming (over SCTP, maybe even with jumbo frames) might be worth exploring as well, but we don't yet know how that would perform.

I'd still really like to see it happen though, and will be exploring options and open to ideas.

logotype commented 10 years ago

WebRTC sounds like a good bet.

Alternatively, given the data rate, maybe a poll/request approach is an option to push?

Sent from my iPhone

On 8 Oct, 2014, at 8:05 am, Peter Ehrlich notifications@github.com wrote:

Transferring the images, raw, requires a pretty high data rate - around 17Mbyte/sec. Initial tests with sending data over the websocket were prohibitively slow.

WebRTC data streaming (over SCTP, maybe even with jumbo frames) might be worth exploring as well, but we don't yet know how that would perform.

I'd still really like to see it happen though, and will be exploring options and open to ideas.

— Reply to this email directly or view it on GitHub.

Dshankar commented 9 years ago

@pehrlich any updates on Image API in JS? IR/RGB passthrough in the browser would be fantastic, even if it requires ugly hacks on my part

Dshankar commented 9 years ago

Chrome extensions have raw TCP sockets (chrome.sockets.tcp). I'm thinking of writing a helper app that uses the ObjectiveC Image API to get image frames, correct distortion, and stream over TCP to the browser. This should get around throughput issues and have little-to-no discernible latency.

I should have some downtime this weekend to work on this. It's an ugly hack but it might work.

pehrlich commented 9 years ago

Would be excited to see this! Keep us posted