|
10 | 10 | <head>
|
11 | 11 |
|
12 | 12 | <meta charset="utf-8">
|
| 13 | + <!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"> --> |
| 14 | + <meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data: gap: https://ssl.gstatic.com 'unsafe-eval'; |
| 15 | + style-src 'self' 'unsafe-inline'; media-src *; connect-src *"> |
13 | 16 | <meta name="description" content="WebRTC reference app">
|
14 | 17 | <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1">
|
15 | 18 | <meta itemprop="description" content="Video chat using the reference WebRTC application">
|
@@ -155,20 +158,19 @@ <h1>AppRTC</h1>
|
155 | 158 | window.updateVideos = function () {};
|
156 | 159 | }
|
157 | 160 |
|
158 |
| - // Wait a bit since we are adding more stuff into the DOM. |
| 161 | + // TODO: Wait a bit since we are adding more stuff into the DOM. |
159 | 162 | setTimeout(function () {
|
160 | 163 | // Avoid iOS WebSocket crash:
|
161 | 164 | // https://github.com/eface2face/cordova-plugin-iosrtc/issues/12
|
162 | 165 | // Also looad the original AppRTC JS scripts once Cordova is ready (so the iosrtc plugin
|
163 | 166 | // has polluted the window namespace with WebRTC class/functions).
|
164 | 167 | ["js/ios-websocket-hack.js", "js/apprtc.debug.js", "js/appwindow.js"].forEach(function (path) {
|
165 |
| - setTimeout(function () { |
166 |
| - var script = document.createElement("script"); |
| 168 | + var script = document.createElement("script"); |
167 | 169 |
|
168 |
| - script.type = "text/javascript"; |
169 |
| - script.src = path; |
170 |
| - document.getElementsByTagName("head")[0].appendChild(script); |
171 |
| - }); |
| 170 | + script.type = "text/javascript"; |
| 171 | + script.src = path; |
| 172 | + script.async = false; |
| 173 | + document.getElementsByTagName("head")[0].appendChild(script); |
172 | 174 | });
|
173 | 175 | }, 1000);
|
174 | 176 | }); // End of ondeviceready.
|
|
0 commit comments