Beta external API's new transport-related promises failing to resolve

Hi there

super liking what I am seeing so far - things seem good and stable, and setting up my own deployment was straightforward, and including a conference with the external API couldn’t be easier.

I have a quick question about the status of the new features running in the beta external API at https://beta.meet.jit.si/external_api.js, because everything else has been so good I am assuming that I am just doing something embarrassingly daft.

Expected behaviour:
methods such as
<api_instance>.isDeviceListAvailable()
<api_instance>.getAvailableDevices()
<api_instance>.setInputVideoDevice("<some_id>","<some_label>")
to be callable in my code, and to have their promises resolve with the expected return values/side effects.

Actual behaviour:
Promises remain pending. Adding in bluebird indicates an error has occurred (see below).

My setup:

I’ve left the code up here temporarily in case that helps you see what I am seeing. To anyone visiting from the (near) future - sorry. It won’t be up still. Here are the details that matter though:

I’ve got a vanilla demo implementation, where
'api = new JitsiMeetExternalAPI(domain, options);`

That runs a videoconference as expected whether I point the domain at my deployment or the global deployment.

Steps to reproduce / isolate issue:

Just to check I have the right api instance - a method that works:
When I go to the console, I can check the number of participants successfully
‘api.getNumberOfParticipants()’

But when I try something that eventually ends up on requiring to interact with the transport, the promise fails to resolve, for example

‘api.isDeviceListAvailable()’
or
‘api.getAvailableDevices().then(devices => {console.log(devices)})’

However, there are devices there to be enumerated, because the built in enumerate works fine e.g.

‘navigator.mediaDevices.enumerateDevices().then(devices => {console.log(devices)})’
returns an array with a couple of cameras in it etc.

In the settings page of the meetings app in the iframe I can change between the two cameras I have, so everything is working internally with device enumeration, etc.

I tried adding in bluebird for a stack trace, and one is given immediately on running a transport-related method at the console, with a stack trace does point at the related function in the external_api, e.g. this after calling ‘api.getAvailableDevices()’ on firefox (the trace was truncated on chrome).

'bitField: 0
_fulfillmentHandler0: undefined
_promise0: undefined
_receiver0: undefined
_rejectionHandler0: undefined
_trace: {…}
_length: 1
_parent: undefined
_promisesCreated: 0
stack: “captureStackTrace@bluebird@3.5.3/js/browser/bluebird.js:1516:23\nCapturedTrace@bluebird@3.5.3/js/browser/bluebird.js:1408:5\nlongStackTracesCaptureStackTrace@bluebird@3.5.3/js/browser/bluebird.js:1083:19\n[22]</module.exports/Promise.prototype._then@bluebird@3.5.3/js/browser/bluebird.js:3017:9\n[22]</module.exports/Promise.prototype.then@bluebird@3.5.3/js/browser/bluebird.js:2910:12\n[22]</module.exports/Promise.prototype.catch@bluebird@3.5.3/js/browser/bluebird.js:2891:12\nr@beta.meet.jit.si/external_api.js:1:1532\ngetAvailableDevices@beta.meet.jit.si/external_api.js:1:22497\n@debugger eval code:1:1\n”`
(sorry, needed to mangle this to get it past the newbie links-in-post <= 2 filter)

For what it is worth:
0. I see the same error whether using that beta external api to connect to my deployment or the global deployment (no big deal given that I think it is the

  1. I can change cameras in the settings menu, so all is well internally
  2. Bluebird is not throwing a stack trace for the navigator.mediaDevices.enumerateDevices()…

Hopefully this is just me doing something stupid in the way I’m trying to use these methods - a steer in the right direction would be gratefully received :slight_smile:

Cheers
Tim

I looked into your example ( https://openpracticalwork.org/videotx ) and the problem there is that we haven’t deployed the device functionality to meet.jit.si yet (where you are creating the meeting). Have you tried the same thing but with domain = 'beta.meet.jit.si';?

Hi Hristo

Thanks for looking into this.

my error in the end - I had a mistake in the device options section that was crashing jitsi with an error referring to a null url parameter; which of course you couldn’t have seen because I had put the domain back to meet.jit.si.

Cheers
Tim

p.s. sorry for the slow response - I was eagerly watching for a reply for a day or so then figured there would be an email notification - which embarrassingly I must have missed.