mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 11:37:48 +00:00
feat(external-local-storage): support
This commit is contained in:
12
modules/API/external/external_api.js
vendored
12
modules/API/external/external_api.js
vendored
@@ -1,3 +1,4 @@
|
||||
import { jitsiLocalStorage } from '@jitsi/js-utils/jitsi-local-storage';
|
||||
import EventEmitter from 'events';
|
||||
|
||||
import { urlObjectToString } from '../../../react/features/base/util/uri';
|
||||
@@ -268,6 +269,7 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
||||
userInfo,
|
||||
e2eeKey
|
||||
} = parseArguments(args);
|
||||
const localStorageContent = jitsiLocalStorage.getItem('jitsiLocalStorage');
|
||||
|
||||
this._parentNode = parentNode;
|
||||
this._url = generateURL(domain, {
|
||||
@@ -277,7 +279,10 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
||||
noSSL,
|
||||
roomName,
|
||||
devices,
|
||||
userInfo
|
||||
userInfo,
|
||||
appData: {
|
||||
localStorageContent
|
||||
}
|
||||
});
|
||||
this._createIFrame(height, width, onload);
|
||||
this._transport = new Transport({
|
||||
@@ -526,6 +531,11 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
|
||||
case 'video-quality-changed':
|
||||
this._videoQuality = data.videoQuality;
|
||||
break;
|
||||
case 'local-storage-changed':
|
||||
jitsiLocalStorage.setItem('jitsiLocalStorage', data.localStorageContent);
|
||||
|
||||
// Since this is internal event we don't need to emit it to the consumer of the API.
|
||||
return true;
|
||||
}
|
||||
|
||||
const eventName = events[name];
|
||||
|
||||
Reference in New Issue
Block a user