Zoom Meeting SDK for Web
    Preparing search index...

    Function shareSource

    • When you use the Meeting SDK for web in an Electron application, if this method is registered, it calls getVideoSourcesCallBack when a user clicks "screen share" to obtain the application information returned by Electron that can share the desktop. Provide the callback function return desktopCapturer to share sources in the Electron app.

      Parameters

      • args: {
            error?: Function;
            getVideoSourcesCallBack:
                | Function
                | (() => Promise<DesktopCapturerSource[]>);
            success?: Function;
        }

        Example:

         const getVideoSources = async () => {
        const result = await window.electron.getSources();
        return result;
        }
        ZoomMtg.shareSource({
        getVideoSourcesCallBack: getVideoSources,
        success: function () {},
        error: function () {}
        });
        • Optionalerror?: Function

          Callback function in the event of an error.

        • getVideoSourcesCallBack: Function | (() => Promise<DesktopCapturerSource[]>)

          Callback function needed to return the source of the Electron share:

        • Optionalsuccess?: Function

          Callback function on success.

      Returns void