File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 59
59
"prismjs" : " ^1.6.0" ,
60
60
"stackblur-canvas" : " ^1.4.0" ,
61
61
"twilio" : " ^3.19.1" ,
62
- "twilio-video" : " ^2.1 .0"
62
+ "twilio-video" : " ^2.4 .0"
63
63
},
64
64
"devDependencies" : {
65
65
"browserify" : " ^14.3.0" ,
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
+ const { isSupported } = require ( 'twilio-video' ) ;
4
+
3
5
const { isMobile } = require ( './browser' ) ;
4
6
const joinRoom = require ( './joinroom' ) ;
5
7
const micLevel = require ( './miclevel' ) ;
@@ -46,7 +48,7 @@ const connectOptions = {
46
48
// using Peer-to-Peer Rooms, so you can comment this line.
47
49
preferredVideoCodecs : [ { codec : 'VP8' , simulcast : true } ] ,
48
50
49
- // For desktop browsers, capture 720p video @ 24 fps.
51
+ // Capture 720p video @ 24 fps.
50
52
video : { height : 720 , frameRate : 24 , width : 1280 }
51
53
} ;
52
54
@@ -146,4 +148,8 @@ async function selectMicrophone() {
146
148
return selectCamera ( ) ;
147
149
}
148
150
149
- window . addEventListener ( 'load' , selectMicrophone ) ;
151
+ // If the current browser is not supported by twilio-video.js, show an error
152
+ // message. Otherwise, start the application.
153
+ window . addEventListener ( 'load' , isSupported ? selectMicrophone : ( ) => {
154
+ showError ( $showErrorModal , new Error ( 'This browser is not supported.' ) ) ;
155
+ } ) ;
You can’t perform that action at this time.
0 commit comments