Sofia Casadei commited on
Commit
38269e7
ยท
1 Parent(s): d70ea37

fix: connection

Browse files
Files changed (2) hide show
  1. static/client.js +1 -1
  2. static/index-screen.html +5 -0
static/client.js CHANGED
@@ -125,7 +125,7 @@ document.addEventListener('DOMContentLoaded', function() {
125
 
126
  try {
127
  // Get WebRTC configuration from global variable
128
- const config = __RTC_CONFIGURATION__;
129
  console.log('WebRTC configuration:', config);
130
 
131
  // Create new peer connection
 
125
 
126
  try {
127
  // Get WebRTC configuration from global variable
128
+ const config = window.__RTC_CONFIGURATION__;
129
  console.log('WebRTC configuration:', config);
130
 
131
  // Create new peer connection
static/index-screen.html CHANGED
@@ -182,6 +182,11 @@
182
  </div>
183
  </div>
184
 
 
 
 
 
 
185
  <script src="/static/client.js"></script>
186
  </body>
187
 
 
182
  </div>
183
  </div>
184
 
185
+ <script type="text/javascript">
186
+ // This placeholder is replaced by the server with the actual RTC configuration JSON string.
187
+ // Assigning it to window.__RTC_CONFIGURATION__ makes it globally available for client.js.
188
+ window.__RTC_CONFIGURATION__ = __RTC_CONFIGURATION__;
189
+ </script>
190
  <script src="/static/client.js"></script>
191
  </body>
192