Skip to content

Instantly share code, notes, and snippets.

@chikoski
Created May 28, 2015 03:21
Show Gist options
  • Save chikoski/ee84775016a99b2ec12d to your computer and use it in GitHub Desktop.
Save chikoski/ee84775016a99b2ec12d to your computer and use it in GitHub Desktop.
var app = {
preview: document.querySelector("video"),
shoot: document.querySelector("#shoot"),
canvas: document.querySelector("canvas"),
sliderX: document.querySelector("#width"),
sliderY: document.querySelector("#height"),
stream: null
};
//(中略)
function updateMosaicSize(){
givenWidth = Number(app.sliderX.value);
givenHeight = Number(app.sliderY.value);
};
<!doctype html>
<html>
<head>
<title>画像データと、その処理</title>
<meta charset="utf-8">
</head>
<body>
<div>
<button id="shoot">撮影</button><br>
幅<input type="range" id="width" min="20" max="100" step="10"><br>
高さ<input type="range" id="height" min="20" max="100" step="10">
</div>
<video src="01.mp4" controls></video>
<canvas width="800" height="600"></canvas>
<script src="app.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment