gimite / web-socket-js

HTML5 Web Socket implementation powered by Flash
BSD 3-Clause "New" or "Revised" License
2.74k stars 490 forks source link

i try it on ie8 but it can't work #138

Closed mika-cn closed 10 years ago

mika-cn commented 10 years ago

doing follow the example. my flash player version is 11 . i put swfobject.js ,web_socket.js and WebSocketMain.swf in a folder call javascripts .

i try below: WEB_SOCKET_SWF_LOCATION = "javascripts/WebSocketMain.swf"; WEB_SOCKET_SWF_LOCATION = "WebSocketMain.swf";

ie8 just cannot work what i can do for this issue?(sorry ! iam not good at english)

gimite commented 10 years ago

Follow "Troubleshooting" section in https://github.com/gimite/web-socket-js . Note that WEB_SOCKET_SWF_LOCATION is either relative or absolute path from the HTML file. Also try absolute path i.e. WEB_SOCKET_SWF_LOCATION = "http://..../javascripts/WebSocketMain.swf";

I forgot whether IE8 has something like developer tool (where you can see console output). If not, you can use Firebug Lite ( http://getfirebug.com/firebuglite ) to see the console output.

mika-cn commented 10 years ago

i visit my page and press F12 see this:


Exception thrown and not caught web_socket.js, Line:78 char 7

LOG:[webSocket] debug enabled LOG:[webSocket] policy file: xmlsocket://192.168.1.184:843 [WebSocket] cannot connect to Web Socket server at ws://192.168.1.184:8080/(SecurityError: Error #2048) make sure the server is running and Flash socket policy file is corrently placed

LOG:[webSocket] closed

i start my websocket server on http://192.168.1.184:8080 by use em-websocket ( 0.5.0 ). i follow "Troubleshooting" section in https://github.com/gimite/web-socket-js . it says use em-websocket not need to place Flash socket policy file on server. and i visit http://getfirebug.com/firebuglite which you suggest, i try put that js file on my page,but it seems not work.

now what can i do.

gimite commented 10 years ago

Did you try the same page with Chrome?

mika-cn commented 10 years ago

dear Ichikawa chrome and firefox work fine. on this morning, i google it and find this page( http://stackoverflow.com/questions/10542577/flash-player-doesnt-connect-to-socket-policy-file-server-gives-securityerror ) i check my adobe flash player on my OS( ubuntu13.04 ), but i cannot find that file( mms.cfg ) ,then i create it and input "DisableSockets=1" on it. i try to visit my page on ie8 but still get the same problem . i see that line(78 ): web-socket.js line 78 : throw "INVALID_STATE_ERR: Web Socket connection has not been established";

any suggestion?

gimite commented 10 years ago

i check my adobe flash player on my OS( ubuntu13.04 ), but i cannot find that file( mms.cfg ) , then i create it and input "DisableSockets=1" on it. i try to visit my page on ie8 but still get the same problem .

Maybe you checked mms.cfg in your server machine? You need to check the file in your client machine (i.e. the machine you are running IE8). I guess it's unlikely that you are running IE8 on Ubuntu.

Anyway, before trying further, remove the mms.cfg file which you have created. DisableSockets=1 will disable the socket connection.

Also, do you specify proxy server in your browser settings? web-socket-js doesn't support proxies.

mika-cn commented 10 years ago

sorry,i typed the wrong.
i install virtual box to run ie8. it try on the other machine. and it work. thank you very much .