From 41b277a2314b14c62e295edf9d29691d7234062d Mon Sep 17 00:00:00 2001 From: Mike Thomas Date: Mon, 17 Apr 2017 12:34:20 +0200 Subject: [PATCH] Update app to use accelerator-core >=2.0.0 --- vanilla-js-sample-app/package.json | 2 +- vanilla-js-sample-app/public/js/app.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vanilla-js-sample-app/package.json b/vanilla-js-sample-app/package.json index 262c9a1..23a1ade 100644 --- a/vanilla-js-sample-app/package.json +++ b/vanilla-js-sample-app/package.json @@ -19,7 +19,7 @@ "dependencies": { "body-parser": "^1.16.0", "express": "^4.14.1", - "opentok-accelerator-core": "*", + "opentok-accelerator-core": ">=2.0.0", "opentok-annotation": "*", "opentok-archiving": "*", "opentok-screen-sharing": "*", diff --git a/vanilla-js-sample-app/public/js/app.js b/vanilla-js-sample-app/public/js/app.js index 2eea428..5a94e86 100644 --- a/vanilla-js-sample-app/public/js/app.js +++ b/vanilla-js-sample-app/public/js/app.js @@ -1,5 +1,6 @@ -/* global otCore */ +/* global AccCore */ +let otCore; const options = { // A container can either be a query selector or an HTMLElement streamContainers: function streamContainers(pubSub, type, data) { @@ -175,7 +176,7 @@ const app = () => { * Initialize otCore, connect to the session, and listen to events */ const init = () => { - otCore.init(options); + otCore = new AccCore(options); otCore.connect().then(() => updateState({ connected: true })); createEventListeners(); };