Skip to content

Commit a52b313

Browse files
author
Igor Khomenko
committed
adoptation fixes for Cordova video chat code sample
1 parent 18620cf commit a52b313

File tree

110 files changed

+95
-10235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+95
-10235
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ quickblox.js
1616

1717
# Cordova build
1818
**/build
19+
20+
*.xcarchive

samples/cordova/video_chat/README.md

Lines changed: 0 additions & 29 deletions

samples/cordova/video_chat/platforms/browser/www/index.html

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff 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,30 @@ <h4 class="caller__name">
370371
loadScriptAsync("js/stateBoard.js")
371372
loadScriptAsync("js/app.js")
372373
}
374+
375+
// Listen for orientation changes and scroll events
376+
//
377+
window.addEventListener('orientationchange', function(){
378+
refreshVideoViewPosition();
379+
});
380+
window.addEventListener("scroll", function(){
381+
refreshVideoViewPosition();
382+
});
383+
//
384+
function refreshVideoViewPosition(){
385+
if (window.device.platform === 'iOS') {
386+
cordova.plugins.iosrtc.refreshVideos();
387+
}
388+
}
389+
373390
</script>
374391

375392
<!-- hack for github Pages -->
376393
<script>
377-
console.log("aaaaa");
378394
var host = "quickblox.github.io";
379-
if ((host == window.location.host) && (window.location.protocol != "https:"))
395+
if ((host == window.location.host) && (window.location.protocol != "https:")){
380396
window.location.protocol = "https";
397+
}
381398
</script>
382399
</body>
383400
</html>

samples/cordova/video_chat/platforms/browser/www/styles.css

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,17 @@ b {
5050
position: relative;
5151
padding: 0 0 75% 0; /* 4:3 */
5252
background: #bfbfbf;
53+
border: 1px solid #00ffff;
54+
}
55+
.qb-video_source {
56+
position: absolute;
57+
top: 0; bottom: 0;
58+
left: 0; right: 0;
59+
max-width: 100%;
60+
max-height: 100%;
61+
margin: auto;
62+
border: 1px solid #ffffff;
5363
}
54-
.qb-video_source {
55-
position: absolute;
56-
top: 0; bottom: 0;
57-
left: 0; right: 0;
58-
max-width: 100%;
59-
max-height: 100%;
60-
margin: auto;
61-
}
6264

6365
.qb-error {
6466
color: #d0021b;

samples/cordova/video_chat/platforms/ios/Video Chat.xcarchive/Info.plist

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)