Merge pull request #1161 from jitsi/pinning-local-not-signal-unpin

Sending unpin after clicking local video and unpinning remote.
This commit is contained in:
hristoterezov 2016-11-28 12:06:56 -06:00 committed by GitHub
commit f32438b219
1 changed files with 9 additions and 3 deletions

View File

@ -341,14 +341,20 @@ var VideoLayout = {
* @param id the identifier of the video thumbnail
*/
handleVideoThumbClicked (id) {
var smallVideo = VideoLayout.getSmallVideo(id);
if(pinnedId) {
var oldSmallVideo = VideoLayout.getSmallVideo(pinnedId);
if (oldSmallVideo && !interfaceConfig.filmStripOnly)
if (oldSmallVideo && !interfaceConfig.filmStripOnly) {
oldSmallVideo.focus(false);
// as no pinned event will be sent for local video
// and we will unpin old one, lets signal it
// otherwise we will just send the new pinned one
if (smallVideo.isLocal)
eventEmitter.emit(
UIEvents.PINNED_ENDPOINT, oldSmallVideo, false);
}
}
var smallVideo = VideoLayout.getSmallVideo(id);
// Unpin if currently pinned.
if (pinnedId === id)
{