numgl.js

by dustinkerstein

HTML

<script src="http://jongomez.github.io/numgl/src/numgl.js"></script>

<video id="video" width="450" height="250" crossorigin="anonymous" controls loop>
    <source id="source" type="video/mp4"></source>
</video>

<button type="button" onclick="numgl.start_pause_button();">Start / Pause</button>

<div>FPS:</div>
<div id="fps"></div>

CSS

video {
   display:none;
   width: 100vw;
}

JavaScript

var x = document.getElementById("source");
fetch("http://files.panomoments.com/uhd_dashinit.mp4").then(function(response) {
  response.blob().then(function(myBlob) {
    x.src = window.URL.createObjectURL(myBlob);
    //x.play();
  });
});

// Show frames per second.
numgl.set_fps_element("fps");
var videoId = numgl.store_video("video");

numgl.show_canvas(videoId);
numgl.grey(videoId);
numgl.do_it();