Re: javascript based rfbclient -
04-30-2009, 12:02 AM
On Wed, 29 Apr 2009 11:23:31 -0700, leo wrote:
> I am a newbie and just trying to learn JS. I am trying to build a
> javascript based vnc viewer. what I am planning to do is connect it to a
> vnc host from my Javascript code which basically talks framebuffer
> protocol. Now the javascript should be able to get that data and decode
> the binary stream and render the images in the browser. Can anyone
> suggest how to go about this. Also if jNext will help me in establishing
> the communication channel between the Javascript client and the vnc
> host. Also would be great to know if anyone is aware of decoding RFB
> bytestream data in Javascript. There are java viewers available but I am
> specifically trying to do this using AJAX. Any help would be highly
> appreciated.
Without extra support, Javascript is only capable of talking to the same
host that served the JS file and must poll the server to see if there is
updated information. It looks like jNext might help get around that, but
it would really limit your target audience. It is something to consider.
There are only three ways of doing point-addressable graphics I've seen
in Javascript, each having its own share of pros and cons.
1) A huge table, each cell its own pixel.
2) A div for each pixel
3) The new 'canvas' element available only in more modern browsers.
(There is some sort of canvas emulator for IE, but it has been
unfavorably commented on.)
I've not seen an RFB decoder in JS. Knowing Javascript's "less-than-
blazing" speed, I'm not sure how really useful it will be, but I am
curious about the result.
Dare I ask why you are choosing to implement this in Javascript instead
of another technology?
|