trickle | userland bandwidth shaper for Unix-like systems
kandi X-RAY | trickle Summary
kandi X-RAY | trickle Summary
Trickle is a userland bandwidth shaper for Unix-like systems.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of trickle
trickle Key Features
trickle Examples and Code Snippets
Community Discussions
Trending Discussions on trickle
QUESTION
I'm having a weird issue with a WebRTC connection between 2 users on different networks.
User A is using a phone hotspot, user B is on my home WiFi.
When user A is the first to join the page, this user sends an offer and some ICE candidates to user B. User B sends an answer and some ICE candidates back to user A, but after about 20 seconds the ICE connection state changes to "failed" (safari) or "disconnected" (chrome). User A and user B are unable to setup a working WebRTC connection.
However, when user B is the first to join the page & creates the offer, and user A sends back an answer, both users are able to connect without issue.
In both cases, user A & user B both have a correct looking localDescription & remoteDescription on their end, but in the second case where the connection fails, the connectionState
& ICEConnectionState
are "failed" (safari) or "disconnected" (chrome) for both users.
I am using both a TURN and STUN server in my RTCPeerConnection
's configuration, and tested the server is working properly using the Trickle ICE WebRTC example
I suspect that somehow user A or user B are unable to see or use all the available ICE candidates for the other user, however I'm unsure how best to troubleshoot the issue. Is there an easy way to see what ICE candidates are available / active for a given RTCPeerConnection
object?
Update:
Looking at the chrome://webrtc-internals (as philipp-hancke sugested) shows that
if user B sends the offer:
4 ICE candidate pairs are available (2 host
, 1 srflx
, 1 relay
)
An ICE candidate pair using the external IP for user B, and a TURN server relay for user A is selected. The connection works.
If user A sends the offer:
Again 4 ICE candidate pairs are available (2 host
, 1 srflx
, 1 relay
), but the ICE Candidate pair shows (not connected)
and no WebRTC connection is made
Update 2: I've accepted Philipp Hancke's answer since it answered the initial question I asked, even it I haven't solved my problem yet. I've asked a new question here.
...ANSWER
Answered 2022-Jan-31 at 20:47This sounds like a long-standing bug in webrtc. Using TURN servers typically solves the problem which explains why this hasn't been a priority for anyone to work on.
chrome://webrtc-internals is the one-shop-stop location to go for debugging issues like this.
QUESTION
I'm trying to figure out how super really works in JavaScript. I have an idea but I'm not sure of it's exactitude so I need some help.
...ANSWER
Answered 2022-Jan-30 at 12:48That's not how it works with class
. The construction parts of it would be close to correct with the old function
-based setup, but class
works slightly differently in this regard.
When you do new C
, the object isn't created until the A
constructor is called. Here's what happens:
new
callsC
's [[Construct]] internal method withnew.target
set toC
.- Any code in
C
prior tosuper()
runs.this
is inaccessible at this point. C
's code callsB
's [[Construct]] (viasuper()
) withnew.target
still set toC
.- Any code in
B
prior tosuper()
runs.this
is still in accessible. B
callsA
's [[Construct]] (viasuper()
) withnew.target
still set toC
.- Since
A
is the base constructor,A
's [[Construct]] creates the object, setting its prototype from theprototype
property ofnew.target
(which isC
). - Any code in the
A
constructor runs, and has access tothis
.
- Since
- Any code in
B
aftersuper()
runs (and has access tothis
).
- Any code in
- Any code in
C
aftersuper()
runs (and has access tothis
).
- Any code in
- The object created by
A
is the result of thenew
expression.
(I'm skipping over some minor details above for clarity.)
This is how the class
construct ensures that the new object is initialized in order from the base constructor (A
) to the first derived constructor (B
) and the finally the new
target (C
). That way, A
has access to the new object first, followed by B
, followed by C
.
More in in the specification link above.
QUESTION
I am trying to understand how to use WebRTC to establish P2P connections following the example here: https://developer.mozilla.org/en-US/docs/Web/API/WebRTC_API/Simple_RTCDataChannel_sample. In my mind, it seems like when I create a new RTCPeerConnection, that connection should contain information about my public ip and subnet, so that when I create an offer and pass it to the remote computer, the remote would then have the details about where to send the response offer. However, whenever I try creating an RTCPeerConnection, it has 0.0.0.0 in it and no mention of my ip (which is not 0.0.0.0). Do you know why this could be? What am I doing wrong? How do I get it to display my public ip?
...ANSWER
Answered 2022-Jan-28 at 19:07The ICE Candidates haven't been gathered yet. It starts after SetLocalDescription
is called, and candidates will be added to your localDescription
as they arrive.
Set onicecandidate and it will called with your 'public ip'.
QUESTION
I have a c++ application that gets the video in RTSP and H264 format from a camera using gstreamer an re-sends the videos using webrtcbin. I have followed the example from this link and I can see the video trough firefox (with the tips suggested in this post), when use VP9 encoding.
The pipeline I have used is:
...ANSWER
Answered 2022-Jan-11 at 12:09One possible reason browsers support only baseline profile
encoded h264 streams.
You can try fool browsers by add something like capssetter caps=\"application/x-rtp,profile-level-id=(string)42c015\"
in between rtph264pay
and webrtcbin
, but it will help only in some cases.
QUESTION
First, I want to mention that I am very new to WebRTC, so any advice would be very helpful.
Currently I am using aiortc
library to build my own WebRTC app.
Here is what I am trying to do.
I have 2 peers, one is web browser, which is written in javascript, and another one is python script, which is working as signaling server and peer at the same time. So If you access to my web page, you will send video frame to server and then the server will make modification of that then send it back.
So I finished testing my app on LAN environment and everything worked as I expected. But once I deployed my app to remote server (Google cloud run) , I encountered Ice connection state failing issue. And gets this log on remote server.
(I think it is due to disconnection between peers, not low memory problem. I tried with 16GB RAM and 4 cpus and still didn't work)
Then, I dig into more information, and found that TURN/STUN server is necessary to build WebRTC app over Internet. So I added google STUN server to my RTCPeerConnection
like this. [{'urls': 'stun:stun.l.google.com:19302'}, {'urls': 'stun:stun1.l.google.com:19302'}, {'urls': 'stun:stun2.l.google.com:19302'}]
(I added both side on javascript and python because both side is working as peer) Unfortunately, it still didn't work.
Now, I am planning to build my own TURN server, but I am afraid if TURN server wouldn't solve this problem. So I would like to have any advice from you since I am quite stuck within my situation.
p.s I have done SSL encryption.(So GetUserMedia
is working fine)
Sdp details(Offer/Answer):
SDP
Offer
...ANSWER
Answered 2021-Dec-10 at 15:13If everything work on local, and this ice server are set, verify that your gcloud server have the correct firewall for webrtc port (not only your signaling port, check the sdp/ice you exchange). also this Webrtc page allow you to check is a stun/turn work on your client
You will not need stun on your python side, as it's a server his ip may be public (unless you don't want to). Stun allow to find your public ip and allow the port to remain open.
On your server you need to open your signaling port (certainly the WS where you exchange the sdp) and the P2P port (candidate lines in the sdp), the media/data will go through this one. For each media (sdp m line) there are usually one used port.
QUESTION
I would like to devise a scalable error handling strategy for my Observable-based Firebase requests. To do so, I am trying to create a custom RxJS operator for each type of error (e.g. unauthenticated
, internal
, you name it). The operators would be stacked after the request as follows:
ANSWER
Answered 2021-Nov-26 at 13:38They're pretty similar. Here's how I might implement these two:
Handle a specific error.QUESTION
I have implemented yt-dlp as part of my Python script, it works well, but I am unable to get the rate-limit feature to work. If you run the same command from the CLI the rate is limited correctly, is anyone able to tell me the correct syntax?
I have tried several combinations such as rate-limit, limit-rate 0.5m, 500k, 500KiB, 500, and none seem to work
...ANSWER
Answered 2021-Nov-07 at 17:07Looking at the source code you'll find that the option you're looking for is called ratelimit
. Its value should be a float:
QUESTION
Hi there, I am attempting to build a WebRTC client in Android that subscribes to a video feed that is being broadcast using NodeJS and JavaScript.
The broadcaster code can be viewed in its entirety in this lovely article by Gabriel Tanner.
It works beautifully when running it in localhost under the http://localhost:4000/broadcaster.html
in Chrome and then visiting my IP Address from another device on the network. I can see the video and it is near real time.
I have tried this using two different webcam devices, both a built-in and a USB webcam but the Android client does not work even though the JavaScript Broadcaster and Client works fine.
The task at handAfter following the tutorial and getting the example to work I decided to try and implement my own Android application for which the entire source code can be viewed right here on my GitHub.
I have followed various tutorials around the place and the issue always stems from attempting to set the remote description which is done with the following bit of code:
...ANSWER
Answered 2021-Nov-16 at 04:29The error message was triggered due to the offer containing H264 codecs whilst the Android Client was not anticipating H264 and was not setup to encode and/or decode this particular hardware encoded stream.
The fix was to ensure that the connection factory was setup as such:
QUESTION
I am trying to create a video chat and using express
and socket.io
on the backend and react
and simple-peer
on the frontend.
This is my server code:
...ANSWER
Answered 2021-Oct-01 at 13:34It looks like the problem lies on the connection from the client. The connection is happening inside the component, which means a new connection will be created every time the component re-renders. Bad mistake.
My code on the client looks like this now:
QUESTION
I have two different WebRTC clients: an Android device and an angular application. I set up a turn and stun server and both seems to work with the trickle ice tester and the webrtc tester.
As you can see here:
But all ice candidates fail in Firefox when I am watching the candidates in about:webrtc
.
Does anyone have an explanation for this?
More info:
- A similar error occurs in Google Chrome, but the logs are from Firefox because Firefox has better logging.
- The devices are on different networks, so the host request should fail and the turn server is needed.
- The turn server is a coturn turn server, but I also tried it with a Pion turn server and the same result occurs.
- Firfox logs: https://gist.github.com/Nick-v-L/365b7da10039d28a6a23a27fea15df52
- Coturn logs: https://gist.github.com/Nick-v-L/04c3cfc677847e3cdcb7f6b5ca15c743
ANSWER
Answered 2021-Jul-07 at 06:57There was a simple error in my Android app. When receiving an ice candidate from the signaling server I did the following:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install trickle
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page