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, because everything else has been so good I am assuming that I am just doing something embarrassingly daft.

Expected behaviour:
methods such as
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

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

‘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\\\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:




I looked into your example ( ) and the problem there is that we haven’t deployed the device functionality to yet (where you are creating the meeting). Have you tried the same thing but with domain = '';?