mirror of https://github.com/jitsi/jitsi-meet
commit
5d17cd0bcc
@ -0,0 +1,12 @@ |
||||
### Adding an icon to the font file (e.g. for the floating menu) |
||||
1. Go to https://icomoon.io/app/ |
||||
2. Go to "Manage Projects" from the menu on the top left. |
||||
3. Use "Import project" and select <code>fonts/selection.json</code> from Jitsi Meet. |
||||
4. Import icons (e.g. svg files) using the "import items" button. |
||||
5. Go to "generate font" and make sure the identifiers for the new icons are correct. |
||||
6. Download the result in a zip file using the "download" button. |
||||
7. Copy <code>selection.json</code> and <code>fonts/jitsi.*</code> from the zip file to <code>fonts/</code> in Jitsi Meet |
||||
8. Copy the class for the new icon from <code>style.css</code> in the zip file to <code>css/font.css</code> in Jitsi Meet (do *not* copy the whole file) |
||||
|
||||
Sample commit: https://github.com/jitsi/jitsi-meet/commit/68bc819b89aec12364fcf07b81efa83a1900eed6 |
||||
|
Binary file not shown.
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 34 KiB |
Binary file not shown.
Binary file not shown.
@ -0,0 +1,47 @@ |
||||
/* global APP */ |
||||
|
||||
/** |
||||
* A module for sending DTMF tones. |
||||
*/ |
||||
var DTMFSender; |
||||
var initDtmfSender = function() { |
||||
// TODO: This needs to reset this if the peerconnection changes
|
||||
// (e.g. the call is re-made)
|
||||
if (DTMFSender) |
||||
return; |
||||
|
||||
var localAudio = APP.RTC.localAudio; |
||||
if (localAudio && localAudio.getTracks().length > 0) |
||||
{ |
||||
var peerconnection |
||||
= APP.xmpp.getConnection().jingle.activecall.peerconnection; |
||||
if (peerconnection) { |
||||
DTMFSender = |
||||
peerconnection.peerconnection |
||||
.createDTMFSender(localAudio.getTracks()[0]); |
||||
console.log("Initialized DTMFSender"); |
||||
} |
||||
else { |
||||
console.log("Failed to initialize DTMFSender: no PeerConnection."); |
||||
} |
||||
} |
||||
else { |
||||
console.log("Failed to initialize DTMFSender: no audio track."); |
||||
} |
||||
}; |
||||
|
||||
var DTMF = { |
||||
sendTones: function (tones, duration, pause) { |
||||
if (!DTMFSender) |
||||
initDtmfSender(); |
||||
|
||||
if (DTMFSender){ |
||||
DTMFSender.insertDTMF(tones, |
||||
(duration || 200), |
||||
(pause || 200)); |
||||
} |
||||
} |
||||
}; |
||||
|
||||
module.exports = DTMF; |
||||
|
@ -0,0 +1,123 @@ |
||||
/* global APP */ |
||||
|
||||
/** |
||||
* This module is meant to (eventually) contain and manage all information |
||||
* about members/participants of the conference, so that other modules don't |
||||
* have to do it on their own, and so that other modules can access members' |
||||
* information from a single place. |
||||
* |
||||
* Currently this module only manages information about the support of jingle |
||||
* DTMF of the members. Other fields, as well as accessor methods are meant to |
||||
* be added as needed. |
||||
*/ |
||||
|
||||
var XMPPEvents = require("../../service/xmpp/XMPPEvents"); |
||||
var Events = require("../../service/members/Events"); |
||||
var EventEmitter = require("events"); |
||||
|
||||
var eventEmitter = new EventEmitter(); |
||||
|
||||
/** |
||||
* The actual container. |
||||
*/ |
||||
var members = {}; |
||||
|
||||
/** |
||||
* There is at least one member that supports DTMF (i.e. is jigasi). |
||||
*/ |
||||
var atLeastOneDtmf = false; |
||||
|
||||
|
||||
function registerListeners() { |
||||
APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_JOINED, onMucMemberJoined); |
||||
APP.xmpp.addListener(XMPPEvents.MUC_MEMBER_LEFT, onMucMemberLeft); |
||||
} |
||||
|
||||
/** |
||||
* Handles a new member joining the MUC. |
||||
*/ |
||||
function onMucMemberJoined(jid, id, displayName) { |
||||
var member = { |
||||
displayName: displayName |
||||
}; |
||||
|
||||
APP.xmpp.getConnection().disco.info( |
||||
jid, "" /* node */, function(iq) { onDiscoInfoReceived(jid, iq); }); |
||||
|
||||
members[jid] = member; |
||||
} |
||||
|
||||
/** |
||||
* Handles a member leaving the MUC. |
||||
*/ |
||||
function onMucMemberLeft(jid) { |
||||
delete members[jid]; |
||||
updateAtLeastOneDtmf(); |
||||
} |
||||
|
||||
/** |
||||
* Handles the reception of a disco#info packet from a particular JID. |
||||
* @param jid the JID sending the packet. |
||||
* @param iq the packet. |
||||
*/ |
||||
function onDiscoInfoReceived(jid, iq) { |
||||
if (!members[jid]) |
||||
return; |
||||
|
||||
var supportsDtmf |
||||
= $(iq).find('>query>feature[var="urn:xmpp:jingle:dtmf:0"]').length > 0; |
||||
updateDtmf(jid, supportsDtmf); |
||||
} |
||||
|
||||
/** |
||||
* Updates the 'supportsDtmf' field for a member. |
||||
* @param jid the jid of the member. |
||||
* @param newValue the new value for the 'supportsDtmf' field. |
||||
*/ |
||||
function updateDtmf(jid, newValue) { |
||||
var oldValue = members[jid].supportsDtmf; |
||||
members[jid].supportsDtmf = newValue; |
||||
|
||||
if (newValue != oldValue) { |
||||
updateAtLeastOneDtmf(); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* Checks each member's 'supportsDtmf' field and updates |
||||
* 'atLastOneSupportsDtmf'. |
||||
*/ |
||||
function updateAtLeastOneDtmf(){ |
||||
var newAtLeastOneDtmf = false; |
||||
for (var key in members) { |
||||
if (typeof members[key].supportsDtmf !== 'undefined' |
||||
&& members[key].supportsDtmf) { |
||||
newAtLeastOneDtmf= true; |
||||
break; |
||||
} |
||||
} |
||||
|
||||
if (atLeastOneDtmf != newAtLeastOneDtmf) { |
||||
atLeastOneDtmf = newAtLeastOneDtmf; |
||||
eventEmitter.emit(Events.DTMF_SUPPORT_CHANGED, atLeastOneDtmf); |
||||
} |
||||
} |
||||
|
||||
|
||||
/** |
||||
* Exported interface. |
||||
*/ |
||||
var Members = { |
||||
start: function(){ |
||||
registerListeners(); |
||||
}, |
||||
addListener: function(type, listener) |
||||
{ |
||||
eventEmitter.on(type, listener); |
||||
}, |
||||
removeListener: function (type, listener) { |
||||
eventEmitter.removeListener(type, listener); |
||||
} |
||||
}; |
||||
|
||||
module.exports = Members; |
@ -0,0 +1,5 @@ |
||||
var Events = { |
||||
DTMF_SUPPORT_CHANGED: "members.dtmf_support_changed" |
||||
}; |
||||
|
||||
module.exports = Events; |
Loading…
Reference in new issue