File tree Expand file tree Collapse file tree 3 files changed +25
-4
lines changed
samples/cordova/video_chat
Video Chat.xcworkspace/xcuserdata/igorkhomenko.xcuserdatad Expand file tree Collapse file tree 3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -370,14 +370,24 @@ <h4 class="caller__name">
370370 loadScriptAsync ( "js/stateBoard.js" )
371371 loadScriptAsync ( "js/app.js" )
372372 }
373+
374+ // Listen for orientation changes
375+ //
376+ window . addEventListener ( 'orientationchange' , doOnOrientationChange ) ;
377+ function doOnOrientationChange ( ) {
378+ if ( window . device . platform === 'iOS' ) {
379+ cordova . plugins . iosrtc . refreshVideos ( ) ;
380+ }
381+ }
382+
373383 </ script >
374384
375385 <!-- hack for github Pages -->
376386 < script >
377- console . log ( "aaaaa" ) ;
378387 var host = "quickblox.github.io" ;
379- if ( ( host == window . location . host ) && ( window . location . protocol != "https:" ) )
388+ if ( ( host == window . location . host ) && ( window . location . protocol != "https:" ) ) {
380389 window . location . protocol = "https" ;
390+ }
381391 </ script >
382392</ body >
383393</ html >
Original file line number Diff line number Diff line change @@ -357,6 +357,7 @@ <h4 class="caller__name">
357357 }
358358
359359 // Load JavaScript files async
360+ //
360361 var loadScriptAsync = function ( path ) {
361362 var jsScript = document . createElement ( "script" ) ;
362363 jsScript . type = "text/javascript" ;
@@ -370,14 +371,24 @@ <h4 class="caller__name">
370371 loadScriptAsync ( "js/stateBoard.js" )
371372 loadScriptAsync ( "js/app.js" )
372373 }
374+
375+ // Listen for orientation changes
376+ //
377+ window . addEventListener ( 'orientationchange' , doOnOrientationChange ) ;
378+ function doOnOrientationChange ( ) {
379+ if ( window . device . platform === 'iOS' ) {
380+ cordova . plugins . iosrtc . refreshVideos ( ) ;
381+ }
382+ }
383+
373384 </ script >
374385
375386 <!-- hack for github Pages -->
376387 < script >
377- console . log ( "aaaaa" ) ;
378388 var host = "quickblox.github.io" ;
379- if ( ( host == window . location . host ) && ( window . location . protocol != "https:" ) )
389+ if ( ( host == window . location . host ) && ( window . location . protocol != "https:" ) ) {
380390 window . location . protocol = "https" ;
391+ }
381392 </ script >
382393</ body >
383394</ html >
You can’t perform that action at this time.
0 commit comments