I'm working with an embedded device that has rather limited capabilities. However It does have lwip stack as well as UPnP support. Problem is that currently transferring data out from the device is quite slow and I would like to minimize number of http requests sent e.g. when opening the landing page. Any idea how to optimize this ? Ideal way would be some compressed format but browser don't like that I guess.
Related
My primary intention is to setup a VoIP session between 2 users A & B; Here the raw audio / video media bytes are fetched from A's browser are played in B's browser and vice versa.
The reason is that, when the user C & D are added into this call, we need not have to create a P2P mesh network which limits the performance.
Tried recording media with getUserMedia() and playback, but it is not real time. It also gives a bad user experience. (However, haven't experimented yet with videos of small chunks as 200 ms)
Is there any approach where I can get the raw bytes of the media and play it on other browser? Currently I have a server in between which can connect to both peers if required.
Any online examples or libraries are welcome.
Have already asked 2 questions in this regard with 100-100 bounties, but not much of use:
How to use libsrtp or similar library to decrypt/encrypt the WebRTC data stream?
How to integrate part of WebRTC as a static / dynamic library with the existing C++ code?
Related: How to stream, live video playing on my browser to browser of another user?
If i understand you well is you're looking on how to have more than two users on the session right? without using mesh topology
thats possible and configurable as well by means that some maybe active speaker or everyone is active speaker not only receiver whatever configuration you choose but to me it seems that you're asking for video conferencing
there are couple of tools for this the best one i might recommend is mediasoup its a SFU as selective fowarding unit mediasoup
I don't know if I understand correctly, but it is not likely that you will get raw video data and play it on the browser, it will just kill your bandwith and performance because the raw data is huge.
You need to use the compressed data ( media codec ex.H264 ) and you need a protocol to send and receive it. If you are looking for sub-second latency than webrtc is your best choice in here already. If you have a server in between, distribute your media through that server instead of Mesh. Check this out for webrtc network topologies:
https://antmedia.io/webrtc-servers/
While working, I'm always having problems related to data sharing.
For example:
I have a computer connected to the printer but my laptop is not and I want to print a file, how do I easily move that file to the printer computer?
How to share a file from my mobile to laptop?
What I'm doing right now is moving the file using a USB disk, e-mail address or facebook.
You as developers, what are you doing for such purposes?
What I do is using network because its fast and safe.
But if I have a good internet connection I would suggest you to use Ziggs.io - Smoothly Share Content Between Devices.
The bad fact about Ziggs is that you need an internet connection to use it.
What I like about it that you don’t have to register, you can share files up to 500 MB per file and they don’t store messages.
More about Ziggs from their website:
What is Ziggs?
Ziggs is a platform that exists to facilitate peoples communications
Ziggs is like a meeting point with your devices, it helps you to
transfer contents between these devices smoothly.
Drag-and-drop PDFs,
images, videos, APK apps and other files directly into Ziggs.
Messages
are delivered directly from your device to the connected clients.
Ziggs doesn't store any type of data and doesn't require your personal
information.
Ziggs uses smart solutions based on client-side to share channel conversation history with new clients.
Exists channel clients will act as seeds, helps new clients to follow up with the conversation.
I've built my own cloud for this exact function:
https://www.github.com/TheWlr9/LocalCloud
However, this question should've been posted on some forum page, and not Stack Exchange.
Assumptions:
All web browsers can already talk to HID devices with JavaScript
A web browser will not tell the user when some JavaScript code is talking to a HID device
WebUSB is a JavaScript library.
Are my assumptions correct here? Or, have I missed something?
I ask this question because WebUSB claims that it will make USB communication safer. But, I have to wonder how safe USB communication can ever be if the user does not know if/when it is happening. My understanding is that right now, a website can talk to a USB device, and the browser does not have to tell the user that this is happening.
WebUSB looks like it will makes things safer because the user will be guided to a safe website, with a safe interface and so on, but it doesn't seem to me as though it solves the gaping problem where a malicious website can hit your USB device without you ever knowing. Am I wrong?
Browsers do not normally talk to HID devices directly but instead go through the operating system's input API which abstracts away both the HID and USB layers in order to provide higher-level events such as key-down or mouse-move. There may be some exceptions to this for exotic HID devices such as gamepads. Nevertheless the browser is not using JavaScript for these devices but the native system API.
Due to the above the concept of "JavaScript talking to a HID device" does not exist. JavaScript does get to receive these high-level events from HID devices. The browser does not explicitly tell the user that it is receiving them because delivery of the event is entirely under the user control. For example, JavaScript will only receive an event from the user's keyboard if the user has pressed a key while the page is in focus. JavaScript cannot send data to the device, only receive it.
WebUSB is not a JavaScript library but an API that is provided by the web browser.
In contrast to the discussion of HID above browsers implementing WebUSB (of which currently there is only Chrome) do notify the user if a page is connected to a USB device. First, there is a permission prompt that gives the user the choice of whether and which device the page can access. Second, there is an indicator on the tab (similar to the one indicating that the page is playing or recording audio) whenever the page has an active connection.
Therefore a malicious website cannot hit your USB device without your knowledge.
I have few apps (driver detective) which communicate with there site from desktop app. I need to check all data (URLs) for security reasons so that I am sure they are not accessing any private data. How can I monitor all such data.
I need to read all data being exchanged from my system to there server.
You're looking for Fiddler or Wireshark
You can monitor all network activity with a monitor such as Wireshark.
I suggest you invest some time learning how to setup filters with Wireshark before beginning. There's a bit of a learning curve, but it will prevent you from becoming overwhelmed by the data passing over the wire.
I want to build a Firefox extension that will allow me to directly manipulate the audio output, applying live filters and effects, from (for example) a streaming video site. Im struggling to find any good resources to help me. I think the effects bit will be ok but I need to find a way of intercepting the audio stream output. Does anyone know if this is possible?
Thanks,
Tom
Sorry, it's not possible. I don't know of any web browsers that expose an interface that lets you manipulate audio output.
Keep in mind that a lot of audio output comes from plug-ins like Flash, and those plug-ins are sending the audio output directly to your operating system - they're not even routing it through your web browser. So it wouldn't be possible for your web browser to intercept the sound if it wanted to.