This section describes the initialization steps outlined in the previous list in more detail. You should also refer to the VidyoWeb sample application for more information. 

  1. Plugin and Chrome Extension detection and initialization — This is implemented in app/js/pages/plugin-detection-page.js. The detection and initialization steps are different depending on which browser the application is currently running on:

    • Google Chrome — This is a two-step process: the first step is detecting if the Extension is installed and the second is detecting if the VidyoClientForWeb plugin is installed.

      • Chrome Extension — To use the Chrome Extension, include the following link in your page <head> section, <link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/
        pbpeceelcfobanmfmmghcconbcfnckpe">.

        To determine if the Extension is installed, call proxyWrapper.detectExtension
        (‘mmedphfiemffkinodeemalghecnicmnh’, callback function{…}). If the Extension is not installed, prompt the user to go the Google Chrome web store and install the Extension.

        The Extension URL is https://chrome.google.com/webstore/detail/vidyowebconnector/mmedphfiemffkinodeemalghecnicmnh.

        If the callback returns saying the Extension is installed, call proxyWrapper.connect();
        proxyWrapper.setOutEventDispatchMethod(outEventCallback).

        These two calls establish a communication channel between your application and the VidyoWebConnector Chrome Extension. Your outEventCallback implementation should be used to receive and process all events coming from the plugin. For a full list of events, refer to Send and Receive Event API Messages inside VidyoClient Parameters. Once the Extension is installed, continue to detect and, if needed, install VidyoClientForWeb.

      • VidyoClientForWeb — To check if the plugin is installed, call isSupportedVersion(function(supported, version){…}). If the plugin is installed, its version will be in the version parameter, and if it is supported, it will be in the supported parameter. In the event that the supported parameter is false, guide the user to install VidyoClientForWeb, which is supported.

        Note that on Mac, after the installation, a user must completely quit Chrome using command+q and then start it again to enable Chrome to use the plugin.


    • IE, Firefox, and Safari — These browsers use an NPAPI plugin. Like with Chrome, the application should take steps to determine if the plugin is installed, and if not, direct the user to install it. Use mimeTypes[MIME_TYPE] to see if the plugin is installed and recognizable by the browser (for non-IE browsers).

      For IE, to determine if the plugin is installed, add the plugin to the HTML DOM and see if it was initialized. For more information, refer to the sample app in the section marked with /* Try IE approach (add object to DOM)*/ and the addPluginToDom function.

  2. Start the plugin — This section is implemented in app/js/pages/plugin-init-page.js in this step as well. The application needs to differentiate between Chrome and other browsers to start VidyoClient hosted inside the plugin.

    • Chrome — Call vidyoClient.setProxy(proxyWrapper) to create the bridge between vidyoclient.js and prowxyarpper.js. Then call proxyWrapper.start(callback{…}).

    • IE, Firefox, and Safari — Call vidyoClient.start(config). The config is a json object containing the needed configuration. Refer to the sample app for more details.
Was this article helpful?
0 out of 0 found this helpful

0 Comments

Follow
Please sign in to leave a comment.