MORE LAYOUTgit add public/mobile public/nojs/ public/shoop.png resources/views/layout1/apply.blade.php resources/views/layout1/nojs.blade.php resources/views/layout1/tos.blade.php resources/views/layout4/ resources/views/layout5!
This commit is contained in:
18
public/mobile/js/animethumbnailer.js
Normal file
18
public/mobile/js/animethumbnailer.js
Normal file
@@ -0,0 +1,18 @@
|
||||
window.onload = function (){
|
||||
var video = document.getElementById('video_html5_api');
|
||||
var thecanvas = document.getElementById('thecanvas');
|
||||
var img = document.getElementById('thumbnail_img');
|
||||
|
||||
video.addEventListener('pause', function(){
|
||||
draw( video, thecanvas, img);
|
||||
}, false);
|
||||
};
|
||||
|
||||
function draw( video, thecanvas, img ){
|
||||
img.setAttribute('crossOrigin', 'anonymous');
|
||||
var context = thecanvas.getContext('2d');
|
||||
context.drawImage( video, 0, 0, thecanvas.width, thecanvas.height);
|
||||
var dataURL = thecanvas.toDataURL();
|
||||
img.setAttribute('src', dataURL);
|
||||
video.setAttribute('crossOrigin', 'anonymous');
|
||||
}
|
Reference in New Issue
Block a user