Skip to content

Instantly share code, notes, and snippets.

@aullman
Created August 27, 2014 04:28
Show Gist options
  • Save aullman/084e1508f957cfa4e868 to your computer and use it in GitHub Desktop.
Save aullman/084e1508f957cfa4e868 to your computer and use it in GitHub Desktop.

Revisions

  1. Adam Ullman created this gist Aug 27, 2014.
    15 changes: 15 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    // Detect whether this browser is IE
    var isNotIE = function isIE () {
    var userAgent = window.navigator.userAgent.toLowerCase(),
    appName = window.navigator.appName;

    return !( appName === 'Microsoft Internet Explorer' || // IE <= 10
    (appName === 'Netscape' && userAgent.indexOf('trident') > -1) ); // IE >= 11
    };

    // If the browser is not IE, and it meets the minimum system requirements for the OpenTok platform,
    // then create your app
    if (isNotIE() && OT.checkSystemRequirements()) {
    var session = OT.initSession('your apiKey', 'your sessionId');
    // ... continue with your OpenTok application
    }