stephenlb / webrtc-sdk

WebRTC Simple Calling API + Mobile SDK - A simplified approach to RTCPeerConnection for mobile and web video calling apps.
https://stephenlb.github.io/webrtc-sdk/
MIT License
853 stars 278 forks source link

Using five or more STUN/TURN servers causes problems #76

Open whitesnow9291 opened 4 years ago

whitesnow9291 commented 4 years ago

Hello :) I followed tutorial for broadcasting and viewer. (I exactly used same code and only changed keys) viewer don't show broadcaster's cam video. And I got this error. Using five or more STUN/TURN servers causes problems And this is error messages from console.

Screen Shot 2020-04-30 at 2 50 39 PM

Is this because keys are of free version? or is this issue?

Thanks

stephenlb commented 4 years ago

Good catch!

stephenlb commented 4 years ago

This may be related to other issues faced.
https://github.com/stephenlb/webrtc-sdk/blob/master/js/webrtc-v2.js#L48-L72

Will update...

stephenlb commented 4 years ago

Did a quick fix: https://github.com/stephenlb/webrtc-sdk/commit/bd71202dc5e0e38618cbf9e1d072ac7690f951b8

whitesnow9291 commented 4 years ago

Yes, it's now fixed. Btw, I have one more issue. viewer don't show broadcasters cam. Please check here. broadcast viewer It's just stuck after showing this log Fetching broadcaster's video Thanks

stephenlb commented 4 years ago

that last one was due to the broadcaster not streaming before the viewer starts. added a notification system when the broadcaster starts so the viewer can reload.

It's not perfect, its a start though. https://github.com/stephenlb/webrtc-sdk/commit/89da1078993d527ca954dd662365a6ea3bea6371

whitesnow9291 commented 4 years ago

Hi @stephenlb Thanks but unfortunately it doesn't work for me. I have cloned and deployed without code change. I have tested for both chrome and firefox. (both not working) Also I have tested with your and my own pub,sub key pairs for both browsers (both not working) I have attached screens shots for each browser.

  1. Chrome
    • broadcaster.html screenshot 2020-05-02 21_48_03-Microsoft Edge It seems to work, as it doesn't show any error in console.
    • viewer.html screenshot Screen Shot 2020-05-02 at 9 44 15 PM It has no error message, but it doesn't show any cam in screen. so it's not working
  2. Firefox
    • broadcaster.html screenshot 2020-05-02 21_50_34-Microsoft Edge Firefox shows errors, and it doesn't show cam also
    • viewer.html screenshot Screen Shot 2020-05-02 at 9 44 38 PM viewer also shows errors and don't show any cam.

I didn't test on safari because it doesn't seem to be browser issue. Maybe I need to find other webrtc framework or should use bare webrtc. Thanks

stephenlb commented 4 years ago

Yes this is the start, and is an incomplete example. The app code needs work, as this is just an example.

Meanwhile, will be working on getting a read-made solution!

stephenlb commented 4 years ago

Should work in Firefox now. It's not going to be exactly what you might be looking for. However it's better.