preparations for audio-only firefox

This commit is contained in:
Philipp Hancke 2013-12-26 16:21:46 +01:00 committed by Yana Stamcheva
parent 91b03ba33c
commit 686bf4904c
1 changed files with 5 additions and 1 deletions

6
app.js
View File

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