// If you are requiring twilio-video from CommonJS,
//
//     const Video = require('twilio-video');
//
//  If you are including twilio-video.js from a <script> tag,
//
//     const Video = Twilio.Video;
//

// 1.0.0-beta4 and earlier
// const client = new Video.Client(accessToken);  

// 1.0.0-beta5 onwards the Client class has been removed. 
// Instead of constructing a Client using an Access Token and then calling connect 
// on it, you can simply call connect and pass it an Access Token directly.
const room = await Twilio.Video.connect('your-token');
@@ -276,18 +276,16 @@
 sToken);
-  
 %0A%0A// 1.0
@@ -335,17 +335,16 @@
 removed.
- 
 %0A// Inst
@@ -418,17 +418,16 @@
  connect
- 
 %0A// on i
@@ -505,28 +505,31 @@
 nst 
-room = await Twilio.
+Video = Twilio.Video;%0A%0A
 Vide
@@ -550,10 +550,399 @@
 r-token'
-);
+, %7B name: 'room-name' %7D).then(function(room) %7B%0A  console.log('Connected to Room %22%25s%22', room.name);%0A%0A  room.participants.forEach(participantConnected);%0A  room.on('participantConnected', participantConnected);%0A%0A  room.on('participantDisconnected', participantDisconnected);%0A  room.once('disconnected', function(error) %7B%0A    return room.participants.forEach(participantDisconnected);%0A  %7D);%0A%7D);%0A

Fix js snippet to not use async/await