Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug that caused screenview to stay off when screenshare was toggled #7

Merged
merged 1 commit into from
Dec 16, 2019

Conversation

dylonChime
Copy link
Contributor

@dylonChime dylonChime commented Nov 26, 2019

Issue #:
#6
Description of changes
Added hide and reveal methods to deltaRenderer. This allows screen view to stay open but hidden when screen share closes.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@dylonChime dylonChime force-pushed the fix-screenshare-stopping-screenview-bug branch from fedfe4d to c85d5ab Compare November 26, 2019 19:45
@dylonChime dylonChime requested a review from aws-geoff November 26, 2019 21:01
aws-geoff
aws-geoff previously approved these changes Dec 10, 2019
@@ -188,6 +188,18 @@ export default class DefaultScreenViewingDeltaRenderer implements ScreenViewingD
}
}

hideViewport(): void {
if (this.viewport) {
this.viewport.style.display = 'none';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should modify the CSS styling of the viewport since this is an element that is passed in by the SDK consumer. In particular, they may be controlling the display attribute themselves and so this could overwrite the attribute. Is there some other way to accomplish the objective here without using CSS styling?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed offline, I modified the CSS for the canvas element rather than the exposed viewport.

@dylonChime dylonChime force-pushed the fix-screenshare-stopping-screenview-bug branch 3 times, most recently from b71418d to 339a3f0 Compare December 11, 2019 01:10
@@ -188,6 +188,18 @@ export default class DefaultScreenViewingDeltaRenderer implements ScreenViewingD
}
}

hideViewport(): void {
if (this.viewport) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be if (this.content) {?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Updated.

}

revealViewport(): void {
if (this.viewport) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be if (this.content) {?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Updated.

@dylonChime dylonChime force-pushed the fix-screenshare-stopping-screenview-bug branch from 339a3f0 to 75d708f Compare December 11, 2019 20:06
@@ -434,4 +434,21 @@ describe('DefaultScreenViewingDeltaRenderer', () => {
deltaRenderer.zoomReset();
});
});

describe('hideViewport and revealViewport', () => {
it('hides and reveals the viewport', () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test does not verify the change made by hideViewport or revealViewport. It looks like other tests in this file check properties of the canvas. Could we do the same here?

@dylonChime dylonChime force-pushed the fix-screenshare-stopping-screenview-bug branch from 75d708f to 2d87e3c Compare December 14, 2019 03:45
@andi-amzn andi-amzn merged commit 5a13fcd into master Dec 16, 2019
@andi-amzn andi-amzn deleted the fix-screenshare-stopping-screenview-bug branch December 16, 2019 18:41
michhyun1 pushed a commit that referenced this pull request Jul 7, 2021
* Create Chat Application Demo

This is taken from https://github.com/aws/amazon-chime-sdk-component-library-react/tree/master/demo/chat which will be deprecated on move.
It adds support for authentication via STS lambda.

* README has directions for new demo location
* Minor README typo fixes

Co-authored-by: David Witherspoon <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants