Browse Source

preparations for audio-only firefox

j8
Philipp Hancke 11 years ago
parent
commit
686bf4904c
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      app.js

+ 5
- 1
app.js View File

33
     connection.connect(jid, document.getElementById('password').value, function (status) {
33
     connection.connect(jid, document.getElementById('password').value, function (status) {
34
         if (status == Strophe.Status.CONNECTED) {
34
         if (status == Strophe.Status.CONNECTED) {
35
             console.log('connected');
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
             document.getElementById('connect').disabled = true;
41
             document.getElementById('connect').disabled = true;
38
         } else {
42
         } else {
39
             console.log('status', status);
43
             console.log('status', status);

Loading…
Cancel
Save