add jsdocs, update API description

This commit is contained in:
isymchych 2015-12-04 15:04:36 +02:00
parent 45f7ce9996
commit b7ac3e9a06
4 changed files with 35 additions and 5 deletions

View File

@ -288,6 +288,15 @@ JitsiConference.prototype.updateDTMFSupport = function () {
}
};
/**
* Allows to check if there is at least one user in the conference
* that supports DTMF.
* @returns {boolean} true if somebody supports DTMF, false otherwise
*/
JitsiConference.prototype.isDTMFSupported = function () {
return this.somebodySupportsDTMF;
};
/**
* Returns the local user's ID
* @return {string} local user's ID

View File

@ -76,6 +76,9 @@ var JitsiConferenceEvents = {
* Indicates that conference has been left.
*/
CONFERENCE_LEFT: "conference.left",
/**
* Indicates that DTMF support changed.
*/
DTMF_SUPPORT_CHANGED: "conference.dtmf_support_changed"
};

View File

@ -77,6 +77,7 @@ JitsiMeetJS.setLogLevel(JitsiMeetJS.logLevels.ERROR);
- IN_LAST_N_CHANGED - passes boolean property that shows whether the local user is included in last n set of any other user or not. (parameters - boolean)
- CONFERENCE_JOINED - notifies the local user that he joined the conference successfully. (no parameters)
- CONFERENCE_LEFT - notifies the local user that he left the conference successfully. (no parameters)
- DTMF_SUPPORT_CHANGED - notifies if at least one user supports DTMF. (parameters - supports(boolean))
2. connection
- CONNECTION_FAILED - indicates that the server connection failed.
@ -213,9 +214,11 @@ The object represents a conference. We have the following methods to control the
17. addTrack(track) - Adds JitsiLocalTrack object to the conference.
- track - the JitsiLocalTrack
18. removeTrack(track) - Removes JitsiLocalTrack object to the conference.
- track - the JitsiLocalTrack
19. isDTMFSupported() - Check if at least one user supports DTMF.
JitsiTrack
======

View File

@ -241,7 +241,7 @@ JitsiConference.prototype.onMemberJoined = function (jid, email, nick) {
var participant = new JitsiParticipant(id, this, nick);
this.eventEmitter.emit(JitsiConferenceEvents.USER_JOINED, id);
this.participants[id] = participant;
this.xmpp.getConnection().disco.info(
this.connection.xmpp.connection.disco.info(
jid, "" /* node */, function(iq) {
participant._supportsDTMF = $(iq).find('>query>feature[var="urn:xmpp:jingle:dtmf:0"]').length > 0;
this.updateDTMFSupport();
@ -290,6 +290,15 @@ JitsiConference.prototype.updateDTMFSupport = function () {
}
};
/**
* Allows to check if there is at least one user in the conference
* that supports DTMF.
* @returns {boolean} true if somebody supports DTMF, false otherwise
*/
JitsiConference.prototype.isDTMFSupported = function () {
return this.somebodySupportsDTMF;
};
/**
* Returns the local user's ID
* @return {string} local user's ID
@ -300,7 +309,7 @@ JitsiConference.prototype.myUserId = function () {
JitsiConference.prototype.sendTones = function (tones, duration, pause) {
if (!this.dtmfManager) {
var connection = this.xmpp.getConnection().jingle.activecall.peerconnection;
var connection = this.connection.xmpp.connection.jingle.activecall.peerconnection;
if (!connection) {
logger.warn("cannot sendTones: no conneciton");
return;
@ -527,6 +536,9 @@ var JitsiConferenceEvents = {
* Indicates that conference has been left.
*/
CONFERENCE_LEFT: "conference.left",
/**
* Indicates that DTMF support changed.
*/
DTMF_SUPPORT_CHANGED: "conference.dtmf_support_changed"
};
@ -9012,9 +9024,10 @@ SDPDiffer.prototype.toJingle = function(modify) {
module.exports = SDPDiffer;
},{"./SDPUtil":31}],31:[function(require,module,exports){
(function (__filename){
var logger = require("jitsi-meet-logger").getLogger(__filename);
SDPUtil = {
var RTCBrowserType = require('../RTC/RTCBrowserType');
var SDPUtil = {
filter_special_chars: function (text) {
return text.replace(/[\\\/\{,\}\+]/g, "");
},
@ -9371,9 +9384,11 @@ SDPUtil = {
return line + '\r\n';
}
};
module.exports = SDPUtil;
}).call(this,"/modules/xmpp/SDPUtil.js")
},{"jitsi-meet-logger":46}],32:[function(require,module,exports){
},{"../RTC/RTCBrowserType":16,"jitsi-meet-logger":46}],32:[function(require,module,exports){
(function (__filename){
/* global $ */
var RTC = require('../RTC/RTC');