2

I am initiating a video call with the ConnectyCube videochat API. In their example app the session object returned from the code below includes a localStream object. I cannot however get this to work - localStream is always null.

const getSession = (calleesIds) => {
  return new Promise((resolve, reject) => {
    const sessionType = ConnectyCube.videochat.CallType.VIDEO;
    const additionalOptions = {};
    const session = ConnectyCube.videochat.createNewSession(calleesIds, sessionType, additionalOptions);
    console.log(session)
    resolve(session);
  })
}

When debugging their example app, the session object looks like this:

sessin object

but mine looks like this:

My session object

The object then gets passed to the getUserMedia function:

const getUserMedia = session => {
  return new Promise((resolve, reject) => {
    session.getUserMedia({
      audio: true,
      video: { facingMode: 'user' }
    }, function(error, stream) {
      error ? reject(error) : resolve(stream);
    });
  });
}

However this returns the error TypeError: Cannot read property 'getUserMedia' of undefined.

Update

Still unable to solve this - it should be possible to figure it out by comparing the functional example app linked to above to my code.

halfer
  • 19,824
  • 17
  • 99
  • 186
Mr. Robot
  • 1,334
  • 6
  • 27
  • 79
  • 1
    Still want to put a bounty on this? I can put one on, if you like. – halfer Aug 28 '19 at 16:57
  • 1
    @halfer thanks for the offer - it has now been solved! – Mr. Robot Aug 29 '19 at 15:11
  • The problem here was with some very confused dependencies. To fix it I had to delete the gradle cache as described here: https://stackoverflow.com/questions/23025433/how-to-clear-gradle-cache – Mr. Robot Aug 29 '19 at 15:09

0 Answers0