Unsolved problem with Qt WebAssembly while running in browser
-
By using this https://doc.qt.io/qt-5/wasm.html i created html page ,While running html page in browser i need to recieve packets from udp .It was not working in html .In qt it was working fine,any solution for this.
-
Hi
Make sure you are using a supported module.
https://wiki.qt.io/Qt_for_WebAssembly#Known_issues_and_platform_notes
supported:
qtbase
qtdeclarative
qtquickcontrols2
qtwebsockets
qtsvg
qtcharts
qtmqtt
Unsupported:qtmultimedia
qtwebviewOther modules are not tested and may or may not work.
-
Sockets are not yet working with Qt Webassembly. There are a couple MR that will enable tcpsocket.
UDP is not possible in a web browser, see the first comment from juj :
https://github.com/emscripten-core/emscripten/issues/5196 -
@lorn-potter Thanks for your information
-
@mrjj Thaks for your info ,qtmqtt is missing tried to add ,But got to know that Udp is not possible in webassembly.
-
@Sowjanya said in problem with Qt WebAssembly while running in browser:
@mrjj Thaks for your info ,qtmqtt is missing tried to add ,But got to know that Udp is not possible in webassembly.
There is an upcoming feature in emscripten that uses a proxy server on the desktop to send tcp/udp packets to the browser via websockets.
https://github.com/emscripten-core/emscripten/pull/7672/files
Full POSIX Sockets over WebSocket Proxy Server
But it does take modifying code to add emscripten_init_websocket_to_posix_socket_bridge(), so all hope is not lost!