Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<link href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
<meta charset=utf-8 />
<title>Avinash</title>
  
</head>
<body>
<canvas id="myCanvas" width="800" height="600" style="border:1px solid #000000;">
Your browser does not support the HTML5 canvas tag.
</canvas>
  
  
</body>
</html>
 
var img = []; //just an image source. you can write your own code for image source
var i = 0;
img[0] ='http://10.17.5.16/oneshotimage1?';
img[1] ='http://10.17.5.16/oneshotimage1?';
  
function reload() {
  var c = document.getElementById("myCanvas");
  var ctx = c.getContext("2d");
  var im = new Image();
  im.src = img[i];
  ctx.drawImage(im,0,0,400,400);
  if (i === 0) {
    i = 1;
  } else {
    i = 0;
  }
}
setInterval(reload , 10);
Output 300px

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers