Skip to content

Commit

Permalink
Fix position and resize screensharing videos.
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
  • Loading branch information
Ivansss committed Mar 14, 2017
1 parent 639f1ed commit a2ba0ba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ video {
}

#app-content.screensharing #localScreenContainer {
max-height: calc(100% - 200px);
height: calc(100% - 200px);
overflow: scroll;
background-color: transparent;
}
Expand Down
18 changes: 14 additions & 4 deletions js/webrtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@ var spreedMappingTable = [];
var spreedListofSpeakers = {};
var latestSpeakerId = null;
var screenSharingActive = false;

window.addEventListener('resize', function(event){
if (screenSharingActive) {
$('#localScreenContainer').children('video').each(function () {
$(this).width('100%');
$(this).height($('#localScreenContainer').height());
});
}
});

OCA.SpreedMe.speakers = {
showStatus: function() {
var data = [];
Expand Down Expand Up @@ -544,10 +554,10 @@ var spreedMappingTable = [];

// Local screen added.
OCA.SpreedMe.webrtc.on('localScreenAdded', function (video) {
video.onclick = function () {
video.style.width = video.videoWidth + 'px';
video.style.height = video.videoHeight + 'px';
};
var initialHeight = $('#app-content').height() - 200;

video.style.width = '100%'
video.style.height = initialHeight + 'px';

OCA.SpreedMe.speakers.unpromoteLatestSpeaker();

Expand Down

0 comments on commit a2ba0ba

Please sign in to comment.