|
|
@@ -172,7 +172,8 @@ ColibriFocus.prototype.makeConference = function (peers) {
|
|
172
|
172
|
};
|
|
173
|
173
|
|
|
174
|
174
|
// Sends a COLIBRI message which enables or disables (according to 'state') the
|
|
175
|
|
-// recording on the bridge.
|
|
|
175
|
+// recording on the bridge. Waits for the result IQ and calls 'callback' with
|
|
|
176
|
+// the new recording state, according to the IQ.
|
|
176
|
177
|
ColibriFocus.prototype.setRecording = function(state, token, callback) {
|
|
177
|
178
|
var self = this;
|
|
178
|
179
|
var elem = $iq({to: this.bridgejid, type: 'get'});
|
|
|
@@ -187,10 +188,7 @@ ColibriFocus.prototype.setRecording = function(state, token, callback) {
|
|
187
|
188
|
function (result) {
|
|
188
|
189
|
console.log('Set recording "', state, '". Result:', result);
|
|
189
|
190
|
var recordingElem = $(result).find('>conference>recording');
|
|
190
|
|
- var newState = recordingElem.attr('state');
|
|
191
|
|
- if (newState == null){
|
|
192
|
|
- newState = false;
|
|
193
|
|
- }
|
|
|
191
|
+ var newState = ('true' === recordingElem.attr('state'));
|
|
194
|
192
|
|
|
195
|
193
|
self.recordingEnabled = newState;
|
|
196
|
194
|
callback(newState);
|