OLD | NEW |
1 require '../scripts/vendor/mootools.js' | 1 require '../scripts/vendor/mootools.js' |
2 ready = require '../scripts/vendor/ready.js' | 2 ready = require '../scripts/vendor/ready.js' |
3 now = window.performance?.now?.bind(window.performance) or Date.now | 3 now = window.performance?.now?.bind(window.performance) or Date.now |
4 | 4 |
5 ready -> | 5 ready -> |
6 info = document.id 'info' | 6 info = document.id 'info' |
7 video = document.id 'video' | 7 video = document.id 'video' |
8 button = document.id 'go' | 8 button = document.id 'go' |
9 sample = document.id 'sample' | 9 sample = document.id 'sample' |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 info.set 'html', "capturing at #{ video.currentTime }" | 61 info.set 'html', "capturing at #{ video.currentTime }" |
62 gif.addFrame video, {copy: true, delay: sampleInterval} | 62 gif.addFrame video, {copy: true, delay: sampleInterval} |
63 | 63 |
64 video.addEventListener 'play', -> | 64 video.addEventListener 'play', -> |
65 clearInterval timer | 65 clearInterval timer |
66 timer = setInterval capture, sampleInterval | 66 timer = setInterval capture, sampleInterval |
67 | 67 |
68 video.addEventListener 'ended', -> | 68 video.addEventListener 'ended', -> |
69 clearInterval timer | 69 clearInterval timer |
70 gif.render() | 70 gif.render() |
OLD | NEW |