fix(large-video): vertically align center screenshare
Stop using special case logic for aligning screenshare videos. It may be possible to have positioning all done using CSS but that seems to be a more significant refactoring.
This commit is contained in:
parent
dcf31baf3a
commit
a9d76a2577
|
@ -166,22 +166,6 @@ function getCameraVideoPosition( // eslint-disable-line max-params
|
|||
verticalIndent };
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of the video horizontal and vertical indents.
|
||||
* Centers horizontally and top aligns vertically.
|
||||
*
|
||||
* @return an array with 2 elements, the horizontal indent and the vertical
|
||||
* indent
|
||||
*/
|
||||
function getDesktopVideoPosition(videoWidth, videoHeight, videoSpaceWidth) {
|
||||
const horizontalIndent = (videoSpaceWidth - videoWidth) / 2;
|
||||
|
||||
const verticalIndent = 0;// Top aligned
|
||||
|
||||
return { horizontalIndent,
|
||||
verticalIndent };
|
||||
}
|
||||
|
||||
/**
|
||||
* Container for user video.
|
||||
*/
|
||||
|
@ -366,23 +350,23 @@ export class VideoContainer extends LargeContainer {
|
|||
* @returns {{horizontalIndent, verticalIndent}}
|
||||
*/
|
||||
getVideoPosition(width, height, containerWidth, containerHeight) {
|
||||
let containerWidthToUse = containerWidth;
|
||||
|
||||
/* eslint-enable max-params */
|
||||
if (this.stream && this.isScreenSharing()) {
|
||||
let availableContainerWidth = containerWidth;
|
||||
|
||||
if (interfaceConfig.VERTICAL_FILMSTRIP) {
|
||||
availableContainerWidth -= Filmstrip.getFilmstripWidth();
|
||||
containerWidthToUse -= Filmstrip.getFilmstripWidth();
|
||||
}
|
||||
|
||||
return getDesktopVideoPosition(width,
|
||||
return getCameraVideoPosition(width,
|
||||
height,
|
||||
availableContainerWidth,
|
||||
containerWidthToUse,
|
||||
containerHeight);
|
||||
}
|
||||
|
||||
return getCameraVideoPosition(width,
|
||||
height,
|
||||
containerWidth,
|
||||
containerWidthToUse,
|
||||
containerHeight);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue