Skip to content

Conversation

@limhenry
Copy link

  1. Force reload to https since it's required by the camera API
  2. Update Google Font to https
  3. Fix image not showing after pressing the "Snapshot" button

1. Force reload to https since it's required by the camera API
2. Update Google Font to https
3. Fix image not showing after pressing the "Snapshot" button
<script>


if (location.protocol != 'https:'){
Copy link
Owner

Choose a reason for hiding this comment

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

if (location.protocol !== 'https:') {



if (location.protocol != 'https:'){
location.href = 'https:' + window.location.href.substring(window.location.protocol.length);
Copy link
Owner

Choose a reason for hiding this comment

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

I think this would work:

location.protocol = 'https:';

Copy link
Author

Choose a reason for hiding this comment

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

yeah. this is actually better :)

return;
}

document.getElementById("monitor").height = video.videoHeight;
Copy link
Owner

Choose a reason for hiding this comment

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

cache and dry it up:

const monitor = document.getElementById('monitor');
monitor.height = video.videoHeight;
monitor.width = video.videoWidth;

Copy link
Author

@limhenry limhenry left a comment

Choose a reason for hiding this comment

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

yeah looks good to me :) haha

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.

2 participants