javascript - HTML5 canvas (videothumbnail) gives SecurityError -


i have read lost of threads on wasnt able find solution. situation. i've loaded video , created thumbnail html5 canvas. when try save canvas image =todataurl error:

uncaught securityerror: failed execute 'todataurl' on 'htmlcanvaselement': tainted canvases may not exported.

<video id="video" width="200"      src="https://sportsquare.s3.amazonaws.com/2012030311_big_1.mp4"    type="video/mp4" controls></video><br/> <canvas id="canvas"></canvas><br/>  <script>     window.setinterval(function(){         var canvas = document.getelementbyid('canvas');         var video = document.getelementbyid('video');         canvas.getcontext('2d').drawimage(video, 0,0,175,125);         var dataurl = canvas.todataurl("image/png");         dataurl = dataurl.replace(/^data:image\/(png|jpg);base64,/, "");     }, 2000); </script> 


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -