bigbluebutton-Github/bigbluebutton-html5/imports/ui/services/storage/index.ts

16 lines
469 B
TypeScript
Raw Normal View History

2016-07-07 20:50:07 +08:00
import Local from './local';
import ObservableStorage from './observable';
2016-07-07 20:50:07 +08:00
import Session from './session';
2016-05-20 02:22:56 +08:00
let StorageSingleton: ObservableStorage | null = null;
export const getStorageSingletonInstance = () => {
const APP_CONFIG = window.meetingClientSettings.public.app;
if (!StorageSingleton) {
StorageSingleton = APP_CONFIG.userSettingsStorage === 'local' ? Local : Session;
}
return StorageSingleton;
};
export default getStorageSingletonInstance;