Multitouch browser

I was wondering can I somehow transmit TUIO data to a browser. So I can use javascript and of course HTML and friends to build a (not really) web based multitouch application. I found no available libraries.. well maybe because it is just ridiculous to implement such thing. But hey, it’s fun to have one! So, I decided to give a try.

The first problem is browser speaks HTTP and TUIO uses OSC things over UDP. Actually, creating a TUIO application using Flash also face this kind of problem. But already have a translator that converts TUIO data (which uses OSC over UDP) to XML data that flash accepts which uses TCP connection. So, if I want to have the TUIO data arrived at the browser, I have to transmit it over HTTP.

Beside that, the tracker transmit a data when a touch event happens. In other words, the TUIO data has to be transmitted right into the browser immediately after it is produced. But, as we know, in (ordinary) HTTP connection, browser is the one who initiate connection, not the server. So, how to solve this?

Then.. i remembered Comet! It’s a concept of pushing data to a browser. Exactly fits what I need. Well.. new problem came since I couldn’t found a simple and ready to use library. One requires me to install Jetty. I tried but didn’t know what to do 😀 so I tried to find another solution. Then I stumbled upon a great tutorial that gave me more keywords for google! It was orbited, stomp, and morbidq which all share another keyword: simple 😀

After coding for several.. err.. hours, i guess, finally now I have a working prototype! See the screencast below.

Basically, there is a script that reads TUIO data from tracker. Then it transmit the data to a message queue that supports stomp. Script inside the browser then takes data from the message queue (or the other way around?) and process it. Communication between the message queue and browser is handled by the orbited. I don’t really know what happens inside =D

Well.. just see the code if you want to know more. Check it out at Have fun!

5 thoughts on “Multitouch browser”

  1. Kalo mo bikin aplikasi multitouch berbasis flash yang dijalankan di browser, TUIO message kayaknya gak perlu diubah ke HTTP…
    Cukup TCP aja selayaknya kita menjalankan aplikasi MT berbasis flash secara standalone..
    Soalnya dulu aku pernah bikin aplikasi MT pake FlexBuilder trus aku jalankan pake browser (sebenernya gak sengaja) ternyata dia bisa menerima TUIO message secara langsung dari CCV (dengan CCV kita gak usah pake FLOSC lagi)…

    Sebelumnya mohon maaf kalo pake bahasa indonesia… ^_^

  2. maksudnya ngontrol browser pake TUIO biar bisa multitouch ato mau memodifikasi browser biar multitouch capable ????

    btw kamu liatnya itu dimana..???

  3. saya cuma ngirim data2 TUIO ke browser. Jadi saya bisa bikin aplikasi multitouch dg apa yg ada di browser (HTML, CSS, Javascript, Canvas, etc).

    Liat apa?

  4. hello,
    Nice work. I have a question for you.
    Can i put i working with an flash example using flosc? Or do i have to have a UDP connection?


Leave a Reply