瀏覽代碼

Does not switch to local video when we're detected as an active speaker. Comments out sample code.

j8
paweldomas 11 年之前
父節點
當前提交
8d6e8d360b
共有 1 個檔案被更改,包括 5 行新增12 行删除
  1. 5
    12
      data_channels.js

+ 5
- 12
data_channels.js 查看文件

@@ -12,11 +12,11 @@ function onDataChannel(event)
12 12
     {
13 13
         console.info("Data channel opened by the bridge !!!", dataChannel);
14 14
 
15
+        // Code sample for sending string and/or binary data
15 16
         // Sends String message to the bridge
16
-        dataChannel.send("Hello bridge!");
17
-
17
+        //dataChannel.send("Hello bridge!");
18 18
         // Sends 12 bytes binary message to the bridge
19
-        dataChannel.send(new ArrayBuffer(12));
19
+        //dataChannel.send(new ArrayBuffer(12));
20 20
     };
21 21
 
22 22
     dataChannel.onerror = function (error)
@@ -38,15 +38,8 @@ function onDataChannel(event)
38 38
 
39 39
             var container  = document.getElementById(
40 40
                 'participant_' + endpointId);
41
-            // Check if local video
42
-            if (!container)
43
-            {
44
-                if (endpointId ===
45
-                        Strophe.getResourceFromJid(connection.emuc.myroomjid))
46
-                {
47
-                    container = document.getElementById('localVideoContainer');
48
-                }
49
-            }
41
+            // Local video will not have container found, but that's ok
42
+            // since we don't want to switch to local video
50 43
             if (container)
51 44
             {
52 45
                 var video = container.getElementsByTagName("video");

Loading…
取消
儲存