So I have a website set up. With a clienta page and a clientb page.
This is basically a split version of this site:
https://webrtc-demos.appspot.com/html/pc2.html
I am using signalr (websockets) to exchange information between the clients.
When a user opens up both cleinta and b on the same computer it works fine.
When a user opens up clienta on one computer and on another computer opens up clientb BUT both computers are on the same network, it works fine.
When a user open up clienta on one computer and on another computer opens clientb BUT on different networks there is no video or audio.
When the ice messages are exchanged i pass back a number so i know the order its sent. On the opposite end they dont always arrive the same order, but audio #1 always gets there before audio#2. and the same with video.
In all cases im using chrome dev 24.
I realize sequence and timing are everything with webrtc. Im just not understanding how it can work on separate pcs on the same network but not different networks. I should point out that when i say same network ive test both at work with 2 pcs and at home with 2 pcs. so i dont think its a firewall thing.
Any ideas?
I did check out https://apprtc.appspot.com/ as its a slightly more relevant link. This lead me to adding a couple settimeouts though they didnt seem to help.
One last thing, i did mention about the ice messages. I should also note that both sides send and receive all the messages. an offer is created and an answer is created. Hence, it working on same network machines.
Update:
Im using jsep and all the latest syntax according to webrtc.org
Update 11/15/2012:
So is there a open source package for creating a media relay?
Specifically .net, but could be php. The current site is public facing, this is how I was able to test on multiple networks. So it seems like I just need another endpoint for the media relay.
Updated 11/16/2012:
In hopes that I'll get it working or get valuable input from other developers I'm putting my code out on github.
https://github.com/thorst/RTC
Updated 11/21/2012
The code now works for everything except different network connections. (as described in this post)
Updated 5/28/2013
This years google io was much better at explaining turn, stun, and ice.
http://www.youtube.com/watch?feature=player_embedded&v=p2HzZkd2A40
For reference here are the older helped me get started
http://www.youtube.com/watch?v=E8C8ouiXHHk
http://www.youtube.com/watch?v=dAhhniqwkp8
Chrome doesn't implement TURN yet. STUN will only help with some types of NATs but not with symmetric ones which are prevalent in home routers. You need a media relay with a public IP to connect two devices that are behind symmetric NATs and the standard for that is TURN https://www.rfc-editor.org/rfc/rfc5766 .
Related
I have a small device implementing a Bluetooth server and a JS page which I open on Chrome that connects and manipulate some of the device characteristics.
Since I'm still playing with the server code, I'm constantly changing/adding services and characteristics and noticed that Chrome still shows my the old ones (actually, more like an unclear mix of old and new ones). Other devices like my phone show the new characteristics.
How can I order Chrome to rediscover services and delete its cache? I've tried to just define the Service Change Characteristic and it didn't help, then tried notify the client upon connection with the values 0x0000 and 0xFFFF (assuming that would invalidate the whole range of handles) but nothing happened..
Also - what does Chrome take as the device name? (in case there are multiple "names", I refer to what's displayed in the scan window). I've tried to set the name in the "aioble.advertise()" function, and also set it in the device name characteristic (0x2A00 under the generic access service) and both didn't change the value. It's still showed as "ESP32" which I believe is some kind of default..
I was hinted that the bluetooth spec is implemented differently between Chrome/Android/iPhone/etc.. So I was hoping to get an answer of how does Chrome implement the Service Changed feature? What should I do as the server to order the client to refetch services data?
Thanks!
I looked at the Web Bluetooth Draft Community Report, last updated on 9 June 2022. Section 6.6.5. Responding to Service Changes describes how Web Bluetooth might be supposed to handle a service changed event.
But according to the Implementation Status, the Service Changed Event is not implemented on any of the platforms as of now.
You could open an issue on their Github page to get more information.
Good day,
Since moving house and having my new internet (and new ISP) installed, some web-pages only half-load and I constantly get cloud-flare warnings requesting that I confirm that I am not a robot. I did not have this problem with the previous ISP. I have attached some examples of the issues I'm having. This does not appear to be a "Chrome-only" thing as I get the same results with IE.
1. The first image shows the web page loading, but not giving all the information.
2. The second image shows the warnings that constantly pop up.
3. The third image is just an example of buttons that won't load on clicking, and some of those buttons don't even let me click them at
all.
Issue:
Can't load into certain pages, and can't click certain buttons, and keep getting this cloud-flare thing.
Things I have tried:
- Restarting computer
- Reinstalling chrome
- DNS flushing using the command prompt
- Changing DNS to the google DNS
Any and all help is greatly appreciated. Thank you.
I'm imagining your computer is the same, but your router is new/different (for the new ISP)? Maybe your computer has existing proxy settings which were specific to your old ISP, and won't work for the new one.
Search 'proxy' in Windows search and disable any custom proxies.
I've got the same issue as well when i moved into my new house. When i researched some more and talked with my tech-savvy cousin, he said that it could be because the internet connection isn't strong (some of the data gets lost in the way) or the ISP isn't allowing you to do the things that you want to do. Sometimes this occurs when you are asking for a lot of data. It is a security feature. Call them and ask why this is happening. Maybe it's different.
Also, check if you have a VPN on. I could also disrupt the websites.
Hope this was useful!!
Try connecting a different device (like an Xbox, or PS, or your phone) and see what happens. If it can connect to the devices mentioned above correctly, then the problem is with your PC or laptop or apple device.
Apparently the issue had to do with the IP address. They gave me my own one and all was well in the world.
A web page is not loading/hanging. How will you debug it?
I have been asked this question couple of times during my telephonic interviews. But I don't know the perfect answer.
I had given answers such as checking if the web-app is deployed properly, the internet itself might be slow, the JSP might have some errors, checking logs for any such detail, etc. But interviewer kept asking "These are all good checks, but what if all of these are fine, what else might be wrong?"
Also, it is not a JavaScript specific question. I can debug the JS/jQuery code using debugger, or following the console.log(). But how will you debug a plain JSP page?
Can any web-application gurus at SO help?
Once you know that you can't simply get to your site in the expected way (what I call the Hail Mary Test), then you need to start from the inside out.
Because of the multiple failure points a website can have, I always create a command line environment that allows me to test the framework & DB operation independently of the web server, firewall settings, etc. This can take some fiddling depending on what you are using, but I've done this successfully with Django, WordPress, Drupal, etc.
Once I know the app itself is working, I connect with a command line client (e.g. links) to see if a client coming from localhost works as expected. This confirms that the server itself is working (at least partially). Then I test from another host on the same LAN. More than once I've seen localhost work and LAN access not work, and the problem is almost always server configuration or firewall configuration.
If all of that works, but you still can't get to your site from the internet, then it is a networking / firewall setting somewhere further up the food chain. Try to find a host that is one step farther up from where you last succeeded and test that. Lather, rinse, repeat.
As far as I know, at the current moment, late 2011 the max-connections-per-server limit remains 6. Please correct me if I am wrong. This is bad that we cannot fix this easily as in Firefox. As far as I know this value is hardcoded.
One of the solutions is to download the Chromium's sources and rebuild them. Is there a more easy solution?
Is there any tricky way to hack this without creating a dozen of mirror-domains?
Why I'm asking the question: My task is to create a html-javascript slideshow that will run inside a fullscreened browser, and a huge monitor is hanging on the wall. The javascript is really complicated, it preloads photos and makes a lot of ajax calls to my web services. If WIFI connection is slow, if 6 photos are loading, the AJAX calls fail, the application runs bad. I want a fast solution based, on http or browser or ubuntu tweak something else, because rebuilding the javascript app will take days.
Offtopic: do you know any other things that can be tweaked in my concrete situation?
IE is even worse with 2 connection per domain limit. But I wouldn't rely on fixing client browsers. Even if you have control over them, browsers like chrome will auto update and a future release might behave differently than you expect. I'd focus on solving the problem within your system design.
Your choices are to:
Load the images in sequence so that only 1 or 2 XHR calls are active at a time (use the success event from the previous image to check if there are more images to download and start the next request).
Use sub-domains like serverA.myphotoserver.com and serverB.myphotoserver.com. Each sub domain will have its own pool for connection limits. This means you could have 2 requests going to 5 different sub-domains if you wanted to. The downfall is that the photos will be cached according to these sub-domains. BTW, these don't need to be "mirror" domains, you can just make additional DNS pointers to the exact same website/server. This means you don't have the headache of administrating many servers, just one server with many DNS records.
I don't know that you can do it in Chrome outside of Windows -- some Googling shows that Chrome (and therefore possibly Chromium) might respond well to a certain registry hack.
However, if you're just looking for a simple solution without modifying your code base, have you considered Firefox? In the about:config you can search for "network.http.max" and there are a few values in there that are definitely worth looking at.
Also, for a device that will not be moving (i.e. it is mounted in a fixed location) you should consider not using Wi-Fi (even a Home-Plug would be a step up as far as latency / stability / dropped connections go).
BTW, HTTP 1/1 specification (RFC2616) suggests no more than 2 connections per server.
Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy. A proxy SHOULD use up to 2*N connections to another server or proxy, where N is the number of simultaneously active users. These guidelines are intended to improve HTTP response times and avoid congestion.
There doesn't appear to be an external way to hack the behaviour of the executables.
You could modify the Chrome(ium) executables as this information is obviously compiled in. That approach brings a lot of problems with support and automatic upgrades so you probably want to avoid doing that. You also need to understand how to make the changes to the binaries which is not something most people can pick up in a few days.
If you compile your own browser you are creating a support issue for yourself as you are stuck with a specific revision. If you want to get new features and bug fixes you will have to recompile. All of this involves tracking Chrome development for bugs and build breakages - not something that a web developer should have to do.
I'd follow #BenSwayne's advice for now, but it might be worth thinking about doing some of the work outside of the client (the web browser) and putting it in a background process running on the same or different machines. This process can handle many more connections and you are just responsible for getting the data back from it. Since it is local(ish) you'll get results back quickly even with minimal connections.
Ok, so I know that HTML in itself isn't done yet, and I've done my fair share of reading for HTML5's offline modes.
Here's the question:
Can I set up an offline app in such a way that the entire system works offline, and SHARES a cache (or an XML repository, or a SQL-Lite DB or something) with other clients in the SAME network?
For example, my system runs on clients that need to share information with each other within a local network, but its fully web based. In case the local network's router dies, how can these clients continue to communicate with one another?
=== END ===
NOTE: If you're still not clear, I'd recommend you read on. The information below is to further clarify what I want.
In case you're still reading, here's a detailed example:
4 people in a restaurant are using a web based ordering system. They each have an iPod Touch (lol) which is connected to the internet via Wifi. Each member logs in to the system under a shared account, which allows them to share information. The cook is also connected, but uses a mounted iPad (lolz) in the kitchen.
When a waiter records an order, the data is stored in a DB, and AJAX is used to constantly refresh the Cook's screen, so he is notified instantly.
Assume, Zeus struck down the electricity in the restaurant.
Now, there's no internet connection, but all devices in question still function thanks to their inherent battery-oriented nature.
The web app switches to offline mode, and utilizes cached menus and screens.
BUT!
How does the offline system share information between client devices? How does the iPod Touch #3 tell the Cook's iPad - "Hey there, this is order #5352"?
The most obvious thought is a shared cache or something...
Ideas?
That is not possible. WebPages cannot communicate without a server.
The only thing you could do is setting up a local server for the case that the server on the internet is offline or not reachable.