Chromecast reciever with WebRtc PeerConnection crashes after 30sec - webrtc

I wrote a screen mirror client app in javascript with html ui, and ran it in chrome browser.
I took same app and deployed as chromecast receiver app, it streams & plays audio/video on chromecast for few seconds and then crashes. I don't see any log information in remote debugger connected.
I am unsure if using webrtc peer connection on chromecast reciever app is supported officially (it clearly works)? If yes, why my app crashes after fixed amount of time?
Also i notice latency starts increasing over time. Not sure why.

Related

Cannot start audio only connection on react-native-webrtc

I’m using JsSIP and react-native-webrtc for audio only communication. I’ve managed to start session and get remote and local stream objects. Our SIP server converts voip calls to a normal phone call. I know I successfully start session because I can call my own phone number and answer it.
Since I can’t use RTCView I can’t play audio. And since there is no audio transmitting, server gives a time out after a while and stops session, and phone hangs up. How can I start sending and receiving sound?

What is the difference between web and app network status in same device

It seems like that my iOS App loses packets but in website (in Chrome) does not in same device. Is there any notable differences in network status between web and app in a same device?
The circumstances are in iPhone, iPad, Chrome, react-native.
Network info api in react-native is not quite useful in this situation.

Disposing kurento webrtc endpoints from java and javascript doesn't remove it from chrome webrtcinternals

We are releasing the webrtc endpoints when user leaves the group call and same on the java script side (disposing the webrtc peer).
In the java logs I also get a callback for successful release of webrtc endpoints.
However, that webrtc peer is not getting removed when we monitor Chrome's webrtc internals. But, those peers don't show any traffic.
Is this an issue with Chrome's webrtc internals that it is not getting cleared from the list?
-Thanks.
It is an issue when releasing RTCPeerConnection resources. The standard does not specify when those resources must be freed, so they stay there until you reload the page. There's little we can do about that, sorry!
Unless of course we are doing something wrong ;-)

C2DM Behavior over Wifi and 3G

I'm developing an app which relies on C2DM to be notified of some new data to be fetched from a REST service. I have successfully implemented the C2DM android feature, but the behavior over Wifi is different from the connection over 3G. The messages are received instantly over 3G, but I have to manually turn Wifi off and on to have a "grace period" of ~1 min in which I receive them instantly.
My question is: Is there any way I can programmatically restart the connection, or trigger the notification fetch?
EDIT:
I've implemented an AsyncTask that periodically "reassociates" the connection to the access point (using WifiManager.reassociate()) every minute and a half. Not so sure about the correctness of this solution, though.
I've seen similar issues. It seems that under some circumstances C2DM messages are not delivered over wifi connections, when they are over 3G. On a related note I've also seen Android devices "drop" the push connection, so messages are not delivered (in my case the solution can be to put the device in airplane mode and then turn the network back on).
This reinforces the fact that all applications that use C2DM should be built so that even if push messaging fails, the app still works (even if messages/updates are slower because there's occasional polling to the server)
I wouldn't personally want to mess with the wifi connection as that's something that may cause problems for the user.

GPRS on iPhone Simulator

I want to activate/enable GPRS on the iPhone programmatically. What are the APIs I can look into? There is no "Network" option in the settings application on the simulator so do I need to test out the application on the device itself?
Using the SDK, you can't "activate" any sort of network access. Simply try to connect to the remote server.
If the device can connect, it will. If it cannot, you need to detect this and display a warning to the user.
Apple's sample code has plenty of examples on how to detect if a network is active.
The Simulator always connects through the host Mac's internet connection. If you are asking how to test GPRS performance on the simulator then you should buy a USB GPRS radio and test rhrough that. You could also use the built in ipfw to throttle network bandwidth to the simulator and simulate GPRS bandwidth (note that latency would still be that of your hows connection). Throttled provides an easier UI than bare ipfw: http://www.intrarts.com/throttled.html
As August says, you can't switch the network on and off from code however, you can test the connection and suggest the user goes and switches on the connection.
There is good sample code from Apple for testing the connection availability and type: http://developer.apple.com/iphone/library/samplecode/Reachability/index.html