rtc-web-archive icon indicating copy to clipboard operation
rtc-web-archive copied to clipboard

Both onSuccess and onFailure don't work when stream.init execute

Open yukitaka13-1110 opened this issue 4 years ago • 6 comments

Hi! I implement webrtc service with agora. It worked in notebook pc but desktop pc(external camera). This is my code. stream.init is fired because console log, prev and next line, is fired. But onSuccess and onFailure aren't working.

private publish(): void {
    if (this.localStream == null) return;

    console.log('in');
    this.localStream.init(
      () => {
        console.log('init success'); // Not called
        this.rtc!.publish(this.localStream!, (e) => {
          throw Error(e);
        });
      },
      (err) => {
        console.log('init failed'); // Not called
        throw Error(err.msg);
      }
    );
    console.log('out');
  }

error

What should I do ?

Environment

agora-rtc-sdk: 3.1.0 Dell desktop pc External camera

yukitaka13-1110 avatar Dec 28 '20 11:12 yukitaka13-1110

can you maybe try running this navigator.mediaDevices.getUserMedia({audio:true, video:true}).then(() => console.log("success")).catch(e => console.error)

plutoless avatar Jan 03 '21 13:01 plutoless

@plutoless I got “success”.

yukitaka13-1110 avatar Jan 04 '21 03:01 yukitaka13-1110

@plutoless Any update? I can use google meets in my desktop pc. So getUserMedia works correctly.

yukitaka13-1110 avatar Jan 05 '21 15:01 yukitaka13-1110

@yukitaka13-1110 https://webdemo.agora.io/agora-web-showcase/examples/Agora-Web-Tutorial-1to1-Web/ can you try out this demo to see if it works for you or not?

plutoless avatar Jan 08 '21 03:01 plutoless

Is agora limited in some countries?

I have agora SDK implemented on my app, the livestreaming is working fine on any system, but it always throw "WebRTC not available" on IOS and the go live button will not even respond at all on android mobiles..... Has anyone encountered this? and what is the solution please?

EASYNETY avatar Feb 24 '21 09:02 EASYNETY

If I understand the error it says that WebRTC is not available in the browser you are using. I assume you are using web SDK on iOS and if so, iOS WebView might not have it (limitation on some iOS versions) and anything using it might not have it too (iOS Firefox, Chrome etc)

Alex

On Feb 24, 2021, at 04:16, EASYNETY [email protected] wrote:

 Is agora limited in some countries?

I have agora SDK implemented on my app, the livestreaming is working fine on any system, but it always throw "WebRTC not available" on IOS and the go live button will not even respond at all on android mobiles..... Has anyone encountered this? and what is the solution please?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

alexsorokoletov avatar Feb 24 '21 15:02 alexsorokoletov