|
@@ -13,6 +13,7 @@ function RemoteVideo(id, VideoLayout, emitter) {
|
13
|
13
|
this.emitter = emitter;
|
14
|
14
|
this.videoSpanId = `participant_${id}`;
|
15
|
15
|
SmallVideo.call(this, VideoLayout);
|
|
16
|
+ this.hasRemoteVideoMenu = false;
|
16
|
17
|
this.addRemoteVideoContainer();
|
17
|
18
|
this.connectionIndicator = new ConnectionIndicator(this, id);
|
18
|
19
|
this.setDisplayName();
|
|
@@ -93,7 +94,7 @@ RemoteVideo.prototype._generatePopupContent = function () {
|
93
|
94
|
APP.translation.translateString("videothumbnail.muted") +
|
94
|
95
|
"</div>";
|
95
|
96
|
|
96
|
|
- muteLinkItem.id = "muteLinkItem";
|
|
97
|
+ muteLinkItem.id = "mutelink_" + this.id;
|
97
|
98
|
|
98
|
99
|
if (this.isMuted) {
|
99
|
100
|
muteLinkItem.innerHTML = mutedHTML;
|
|
@@ -105,7 +106,7 @@ RemoteVideo.prototype._generatePopupContent = function () {
|
105
|
106
|
}
|
106
|
107
|
|
107
|
108
|
// Delegate event to the document.
|
108
|
|
- $(document).on("click", ".mutelink", function(){
|
|
109
|
+ $(document).on("click", "#mutelink_" + this.id, function(){
|
109
|
110
|
|
110
|
111
|
if (this.isMuted)
|
111
|
112
|
return;
|
|
@@ -130,8 +131,9 @@ RemoteVideo.prototype._generatePopupContent = function () {
|
130
|
131
|
|
131
|
132
|
ejectLinkItem.className = 'ejectlink';
|
132
|
133
|
ejectLinkItem.innerHTML = ejectIndicator + ' ' + ejectText;
|
|
134
|
+ ejectLinkItem.id = "ejectlink_" + this.id;
|
133
|
135
|
|
134
|
|
- $(document).on("click", ".ejectlink", function(){
|
|
136
|
+ $(document).on("click", "#ejectlink_" + this.id, function(){
|
135
|
137
|
this.emitter.emit(UIEvents.USER_KICKED, this.id);
|
136
|
138
|
this.popover.forceHide();
|
137
|
139
|
}.bind(this));
|
|
@@ -178,6 +180,7 @@ if (!interfaceConfig.filmStripOnly) {
|
178
|
180
|
spanElement.appendChild(menuElement);
|
179
|
181
|
|
180
|
182
|
this._initPopupMenu(this._generatePopupContent());
|
|
183
|
+ this.hasRemoteVideoMenu = true;
|
181
|
184
|
};
|
182
|
185
|
|
183
|
186
|
} else {
|
|
@@ -419,6 +422,7 @@ RemoteVideo.prototype.removeRemoteVideoMenu = function() {
|
419
|
422
|
if (menuSpan.length) {
|
420
|
423
|
this.popover.forceHide();
|
421
|
424
|
menuSpan.remove();
|
|
425
|
+ this.hasRemoteVideoMenu = false;
|
422
|
426
|
}
|
423
|
427
|
};
|
424
|
428
|
|