spot-client/src/zoom/sdk/sdk.js
/**
     * Performs the bootstrapping required by the Zoom JS SDK.
     *
     * @param {Function} onStatusChange - Callback to invoke when there is
     * a meeting-related update.
     * @returns {Promise} Resolve if initialization was successful.
     */
Performs the bootstrapping required by the Zoom JS SDK.
@param {Function} onStatusChange - Callback to invoke when there is
a meeting-related update.
@returns {Promise} Resolve if initialization was successful.
Performs the bootstrapping required by the Zoom JS SDK . @param { Function } onStatusChange - Callback to invoke when there is a meeting - related update . @returns { Promise } Resolve if initialization was successful .
initialize(onStatusChange) {
        this._onStatusChange = onStatusChange;
        if (!window.jQuery || !window.$) {
            const $ = require('jquery');
            window.jQuery = $;
            window.$ = $;
        }
        const ZoomMtg = this._getZoomMtg();
        ZoomMtg.setZoomJSLib('https://source.zoom.us/1.7.0/lib', '/av');
        ZoomMtg.preLoadWasm();
        ZoomMtg.prepareJssdk();
        const initPromise = new Promise((resolve, reject) => {
            ZoomMtg.init({
                leaveUrl: '/dist/zoom-close.html',
                isSupportAV: true,
                success() {
                    resolve();
                },
                error(res) {
                    reject(res);
                }
            });
        });
        return initPromise.then(() => {
            this._hangUpController = new HangUpController();
            this._participantCountController = new ParticipantCountObserver(count => {
                this._onStatusChange(events.PARTICIPANTS_COUNT_UPDATED, { count });
            });
            this._audioMuteController = new AudioMuteController(muted => {
                this._onStatusChange(events.AUDIO_MUTE_UPDATED, { muted });
            });
            this._modalController = new ModalController();
            this._videoMuteController = new VideoMuteController(muted => {
                this._onStatusChange(events.VIDEO_MUTE_UPDATED, { muted });
            });
        });
    }
initialize ( onStatusChange ) { this . _onStatusChange = onStatusChange ; if ( ! window . jQuery || ! window . $ ) { const $ = require ( 'jquery' ) ; window . jQuery = $ ; window . $ = $ ; } const ZoomMtg = this . _getZoomMtg ( ) ; ZoomMtg . setZoomJSLib ( 'https://source.zoom.us/1.7.0/lib' , '/av' ) ; ZoomMtg . preLoadWasm ( ) ; ZoomMtg . prepareJssdk ( ) ; const initPromise = new Promise ( ( resolve , reject ) => { ZoomMtg . init ( { leaveUrl : '/dist/zoom-close.html' , isSupportAV : true , success ( ) { resolve ( ) ; } , error ( res ) { reject ( res ) ; } } ) ; } ) ; return initPromise . then ( ( ) => { this . _hangUpController = new HangUpController ( ) ; this . _participantCountController = new ParticipantCountObserver ( count => { this . _onStatusChange ( events . PARTICIPANTS_COUNT_UPDATED , { count } ) ; } ) ; this . _audioMuteController = new AudioMuteController ( muted => { this . _onStatusChange ( events . AUDIO_MUTE_UPDATED , { muted } ) ; } ) ; this . _modalController = new ModalController ( ) ; this . _videoMuteController = new VideoMuteController ( muted => { this . _onStatusChange ( events . VIDEO_MUTE_UPDATED , { muted } ) ; } ) ; } ) ; }
Performs the bootstrapping required by the Zoom JS SDK.
Performs the bootstrapping required by the Zoom JS SDK .
// Zoom assumes jQuery will be available globally.