瀏覽代碼

preparations for audio-only firefox

j8
Philipp Hancke 11 年之前
父節點
當前提交
686bf4904c
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. 5
    1
      app.js

+ 5
- 1
app.js 查看文件

@@ -33,7 +33,11 @@ function init() {
33 33
     connection.connect(jid, document.getElementById('password').value, function (status) {
34 34
         if (status == Strophe.Status.CONNECTED) {
35 35
             console.log('connected');
36
-            getUserMediaWithConstraints(['audio', 'video'], '360');
36
+            if (RTC.browser == 'firefox') {
37
+                getUserMediaWithConstraints(['audio']);
38
+            } else {
39
+                getUserMediaWithConstraints(['audio', 'video'], '360');
40
+            }
37 41
             document.getElementById('connect').disabled = true;
38 42
         } else {
39 43
             console.log('status', status);

Loading…
取消
儲存