ionorg / ion-sdk-js

ion javascript sdk
MIT License
102 stars 69 forks source link

Failed to set local answer SDP on setLocalDescription for Chrome #216

Open VicFrolov opened 3 years ago

VicFrolov commented 3 years ago

Your environment.

What did you do?

I am able to successfully connect to a remote stream in safari, but get the above error when trying to connect on chrome

    const serverUrl = getServerUrl(roomId);
    const signal = new IonSFUJSONRPCSignal(serverUrl);
    client = new Client(signal, config);

    signal.onopen = async () => {
      try {
        if (client) {
          await client.join(roomId, 'someUid');
        }
      } catch (err) {
        console.log('SETUP CLIENT ERROR', err);
      }
    };

    client.ontrack = (track, stream) => {
      if (track.kind === 'video') {
        track.onunmute = () => {
          const newVideoStream = {
            autoplay: true,
            id: stream.id,
            muted: false,
            srcObject: stream,
          };

          setVideoStream(newVideoStream);
        };
      }
    };

What did you expect?

No error to occur

What happened?

Error occurred in sdk on setLocalDescription

RoyalBosS-Ayush commented 1 year ago

Facing same. Did you find something that work out?