feat(external_ap) add api call to get live stream url
This commit is contained in:
parent
a57b967f2e
commit
bca9a12df1
|
@ -441,6 +441,23 @@ function initCommands() {
|
|||
});
|
||||
break;
|
||||
}
|
||||
case 'get-livestream-url': {
|
||||
const state = APP.store.getState();
|
||||
const conference = getCurrentConference(state);
|
||||
let livestreamUrl;
|
||||
|
||||
if (conference) {
|
||||
const activeSession = getActiveSession(state, JitsiRecordingConstants.mode.STREAM);
|
||||
|
||||
livestreamUrl = activeSession?.liveStreamViewURL;
|
||||
} else {
|
||||
logger.error('Conference is not defined');
|
||||
}
|
||||
callback({
|
||||
livestreamUrl
|
||||
});
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -753,6 +753,18 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
|||
return getCurrentDevices(this._transport);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current livestream url.
|
||||
*
|
||||
* @returns {Promise} - Resolves with the current livestream URL if exists, with
|
||||
* undefined if not and rejects on failure.
|
||||
*/
|
||||
getLivestreamUrl() {
|
||||
return this._transport.sendRequest({
|
||||
name: 'get-livestream-url'
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the conference participants information.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue