Connecting to Kurento via Socket.io

727 views
Skip to first unread message

husman

unread,
Sep 17, 2014, 12:54:41 PM9/17/14
to kur...@googlegroups.com
Before I start, I would like to thank the Kurento team for creating and well documenting such a robust Media Server! I look forward to utilizing this server extensively in the future. Thank you!

I am at a road block at the moment :(

I am running the Kurento group conference demo on Ubuntu. Everything works fine. However, when I attempt to use Socket.io for the Websocket connection, I receive a Cross Domain Access error. How can I set the headers on Kurento messages?


2. I am able to run/test the application via the command: mvn compile exec:java -Dexec.mainClass="com.kurento.kmf.turotial.group.GroupCall"

3. I am able to access it outside of localhost via: 192.168.xx.xxx:8080

4. Now I placed the HTML5 static resources on another server with ip address: 192.168.xx.yyyy

5. I am still able to access and play with the sample through browsers that support WebSocket, such as Chrome, Firefox, and Safari.

6. To connect to the server via a non-WebSocket browser (such as IE9), I am using Socket.io and have changed the necessary javascript functions to use Socket.io when WebSocket is not available on the active browser.

7. I receive the error: XMLHttpRequest cannot load http://192.168.xx.xxx:8080/socket.io/?EIO=3&transport=polling&t=1410971296890-0. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://husman.dev.com' is therefore not allowed access. 

How can I set this header within this project or within KMF?

Thank you!

LuLop

unread,
Sep 18, 2014, 3:36:55 AM9/18/14
to kur...@googlegroups.com
For solving this problem you need a CORS filter such as this: http://software.dzhuvinov.com/cors-filter.html

In addition to this, be aware that KMF is being deprecated by a new architecture which will released in the next few days. Perhaps it's worthy for you to wait until it's ready.

Best.

L.

--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Haleeq Usman

unread,
Sep 24, 2014, 4:47:06 PM9/24/14
to kur...@googlegroups.com
Thank you for such a prompt reply. The information you have provided me is very useful and helpful. Thank you I am on the look out for KMF's replacement :).
Reply all
Reply to author
Forward
0 new messages