How should I do it if I have to do flutter (web) webrtc stun server to use only in the local network with one to many?
diagram
example for webrtc one to many
Related
I am building a Flutter application and I want to integrate continuous Speech-to-Text recognition. For continuous recognition to work, I need to connect with Azure Speech-to-Text via web socket. I found a documentation for REST and for the SDKs (there is no SDK for Flutter). But not for web socket. How can I connect to Azure STT with a web socket?
I tried to open a web socket connection with this URL:
wss://<endpoint_url>/speech/recognition/continuous?language=<language_code>&format=<audio_format>&subscription-key=<subscription_key>
I've started testing edgeSDK in a prototype IOT environment.
The idea is to connect devices with sensors and other nodes (Raspberry Pi, ESP8266, macOS, etc.) and exchange data or messages between them on the edge, trying to avoid communicating through the cloud.
(I will be also "mirroring" this exchanges in an AWS central cloud environment, to establish some comparisons/evaluations).
At this point, I have edgeSDK running on macOS and the Raspberry Pi and would like to add ESP8266 into the mix.
My Question is:
Can I get ESP8266 to work with edgeSDK? I don't see it listed as a supported platform.
If yes, which OS? (I was thinking about Mongoose, keeping the JavaScript coding and follow the standard).
Any other comments/suggestions or similar references would be very welcome!
ESP8266 is a microcontroller, which edgeSDK does not support. However, you can run a RESTFul API client on ESP8266 to call a API served by a microservice hosted by edgeSDK on a Raspberry Pi for example.
I am looking for the latest technology in Google Chrome to read a TCP socket on the users computer and capture the data (which I will then manipulate and populate a field on the web page.) I have read about NPAPI, chrome apps and chrome extensions but each is either about to be deprecated or doesn't support TCP sockets. What method is available that will be supported for more than the next year?
I have already developed a similar addon for Internet Explorer in ActiveX that is called in javascript and works well.
I am having some issues with sockets in UWP.
I'm trying to test some simple socket communications (stripped down version of the MSDN example) between a mobile and a desktop on the same LAN subnet. I am developing in a VM (on a separate desktop) and can deploy to the VM and mobile. In that case connections work fine.
When I create an app package and install it on the desktop, I cannot connect.
I have windows firewall on the desktop completely off. The VM is set to have a separate IP on the network. I have checked all IPs I'm using are correct.
I am getting the typical: A connection attempt failed because the connected party did not properly respond after a period of time
This is driving me crazy, if anyone has any helpful advice that would be much appreciated!
edit: To clarify the above.
My app has both both client and server roles (can connect to a listener, and is also listening itself).
App (on Mobile) --> App (on VM, deployed from VS) - this works fine, Mobile can connect to VM no problem.
App (on Mobile) --> App (on Desktop, installed from appx) - Mobile unable to connect to Desktop. Firewall on desktop disabled. Task Manager shows .exe listening on the correct port.
Thanks, Inci
Found a solution to this - it appears connections over LAN need to have the Internet(Client & Server) capability selected.
I am most certainly connecting over my local network (specifically 192.168.0.15 (mobile) to .21 (desktop). It seems that when deploying with VS the app doesn't need the Internet capability.
If there is a more 'correct' solution I'll amend this.
I have a google chrome web extension that needs to communicate with a Qt desktop application - but how?
There is chrome's native messaging, but as I want to support multiple browsers/OS, this would be too much effort because it is only for chrome.
Then there is this post that suggests setting up a local server. This is what I did, see below.
I have set up a server with Qt with QTcpServer that uses QTcpSocket's on 127.0.0.1 (localhost). But a web extension can not listen to sockets, only chrome apps can. There are 2 possible solutions on my mind:
As a workaround, I could perhaps write a small chrome app. The Qt application would talk to the chrome extension via the chrome app (chrome apps support sockets). But I think this method is clumsy and not quite elegant.
On the other hand, I have read about socket.io.
The idea is: The chrome extension talks via http requests with socket.io, and socket.io talks via sockets with my desktop app. Is this a possible solution?
What I also tried, is to directly connect to the local server with the following code. In my Qt server application, I see that there is a new connection. But I can not get a response at all (either my Qt code is wrong or it is because extensions can not listen to sockets?)
var xhr = new XMLHttpRequest();
xhr.open("GET", "http://localhost:12345", true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
alert('This is the response from the server: '+ xhr.responseText );
}
as you already know extensions can not create direct connections:
Google Chrome Socket API in extensions
possible solution
maybe your QT application could serve a websocket and you should be able to communicate with that from Javascript:
http://www.html5rocks.com/en/tutorials/websockets/basics/
if you are unable to serve websockets from inside the QT application, another approach could be create a "bridge" a little script that could serve a websocket to your JavaScript and pass the messages from/to the QT application
you will find plenty of examples on websockets, the easy way to get into this could be creating a little server using node.js to play with it stackabuse.com/node-js-websocket-examples-with-socket-io/
oh! and do a search for "websocket same origin policy"
Example of an extension using websockets (that will be useful for debugging): chrome.google.com/webstore/detail/simple-websocket-client/pfdhoblngboilpfeibdedpjgfnlcodoo?hl=en
hope this helps