Removes join / leave notifications if the participant start audio muted.

This commit is contained in:
hristoterezov 2015-05-26 14:18:45 +03:00
parent 5746261961
commit 1d660e1883
4 changed files with 25 additions and 5 deletions

View File

@ -19,7 +19,7 @@
<script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib --> <script src="libs/popover.js?v=1"></script><!-- bootstrap tooltip lib -->
<script src="libs/toastr.js?v=1"></script><!-- notifications lib --> <script src="libs/toastr.js?v=1"></script><!-- notifications lib -->
<script src="interface_config.js?v=5"></script> <script src="interface_config.js?v=5"></script>
<script src="libs/app.bundle.js?v=73"></script> <script src="libs/app.bundle.js?v=74"></script>
<script src="analytics.js?v=1"></script><!-- google analytics plugin --> <script src="analytics.js?v=1"></script><!-- google analytics plugin -->
<link rel="stylesheet" href="css/font.css?v=7"/> <link rel="stylesheet" href="css/font.css?v=7"/>
<link rel="stylesheet" href="css/toastr.css?v=1"> <link rel="stylesheet" href="css/toastr.css?v=1">

View File

@ -7706,7 +7706,9 @@ var VideoLayout = (function (my) {
container.id = 'mixedstream'; container.id = 'mixedstream';
container.className = 'videocontainer'; container.className = 'videocontainer';
remotes.appendChild(container); remotes.appendChild(container);
UIUtil.playSoundNotification('userJoined'); if(!config.startAudioMuted ||
config.startAudioMuted > APP.members.size())
UIUtil.playSoundNotification('userJoined');
} }
if (container) { if (container) {
@ -8227,7 +8229,9 @@ var VideoLayout = (function (my) {
// Remove whole container // Remove whole container
container.remove(); container.remove();
UIUtil.playSoundNotification('userLeft'); if(!config.startAudioMuted ||
config.startAudioMuted > APP.members.size())
UIUtil.playSoundNotification('userLeft');
VideoLayout.resizeThumbnails(); VideoLayout.resizeThumbnails();
} }
@ -10283,6 +10287,12 @@ var Members = {
}, },
removeListener: function (type, listener) { removeListener: function (type, listener) {
eventEmitter.removeListener(type, listener); eventEmitter.removeListener(type, listener);
},
size: function () {
return Object.keys(members).length;
},
getMembers: function () {
return members;
} }
}; };

View File

@ -779,7 +779,9 @@ var VideoLayout = (function (my) {
container.id = 'mixedstream'; container.id = 'mixedstream';
container.className = 'videocontainer'; container.className = 'videocontainer';
remotes.appendChild(container); remotes.appendChild(container);
UIUtil.playSoundNotification('userJoined'); if(!config.startAudioMuted ||
config.startAudioMuted > APP.members.size())
UIUtil.playSoundNotification('userJoined');
} }
if (container) { if (container) {
@ -1300,7 +1302,9 @@ var VideoLayout = (function (my) {
// Remove whole container // Remove whole container
container.remove(); container.remove();
UIUtil.playSoundNotification('userLeft'); if(!config.startAudioMuted ||
config.startAudioMuted > APP.members.size())
UIUtil.playSoundNotification('userLeft');
VideoLayout.resizeThumbnails(); VideoLayout.resizeThumbnails();
} }

View File

@ -117,6 +117,12 @@ var Members = {
}, },
removeListener: function (type, listener) { removeListener: function (type, listener) {
eventEmitter.removeListener(type, listener); eventEmitter.removeListener(type, listener);
},
size: function () {
return Object.keys(members).length;
},
getMembers: function () {
return members;
} }
}; };