Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
shhhhhhh
  • Loading branch information
dmk14013 committed Apr 26, 2018
1 parent efc4aee commit 302f609
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion js/plugins.js
Expand Up @@ -117,8 +117,22 @@
// The width and height of the captured photo. We will set the
// width to the value defined here, but the height will be
// calculated based on the aspect ratio of the input stream.
var width = 0
function myFunction(x) {
if (x.matches) { // If media query matches
width = 240;
} else {
width = 480;
}
}

var x = window.matchMedia("(max-width: 500px)")
myFunction(x) // Call listener function at run time
x.addListener(myFunction) // Attach listener function on state changes



var width = 480; // We will scale the photo width to this
// We will scale the photo width to this
var height = 0; // This will be computed based on the input stream

// |streaming| indicates whether or not we're currently streaming
Expand Down

0 comments on commit 302f609

Please sign in to comment.