Tag: html5

Draw images on canvas locally using Chrome

I have an HTML5 app that must be run locally. When I run the app and try to load image on the canvas, on Chrome I get the error message: Unable to get image data from canvas because the canvas has been tainted by cross-origin data Both the HTML document and the images a in […]

how to reload template in ng-include angularjs

I want to reload template which I have included in page using ng-include <div ng-include=”exercise_tpl.url”></div> I am able to do this by loading blank template and the again loading previous template like this $scope.exercise_tpl.url = ‘partials/blank.html’; $(‘body’).trigger(‘click’); setTimeout(function() { $scope.exercise_tpl.url = ‘partials/memory.html’; $(‘body’).trigger(‘click’); }, 300); I want to know right way of reloading template in […]

Adding 'download' attribute to <a> dynamically using Jquery

I am trying to add the download attribute to an tag dynamically. Here is what I have so far: $(fclass).append(‘<a href=”/files/’+$days[$i][2][1]+'” download>’+$days[$i][2][0]+'</a>’); Which produces this: <a href=”/files/day0.pdf” download=””>Slideshow (Notes)</a> I also added the exact same tag as this produces into my HTML manually, but instead of <a href=”/files/day0.pdf” download=””> I used <a href=”/files/day0.pdf” download> The […]

html5 video tag not working in android phonegap

I have created application in android phonegap.I want to play video using html5 video player. My code is: <!DOCTYPE html> <html> <head> <title>Video.js | HTML5 Video Player</title> <link href=”http://vjs.zencdn.net/c/video-js.css” rel=”stylesheet” type=”text/css”> <script src=”http://vjs.zencdn.net/c/video.js”></script> </head> <body> <video id=”example_video_1″ class=”video-js vjs-default-skin” controls preload=”none” width=”640″ height=”264″ poster=”http://video-js.zencoder.com/oceans-clip.png” data-setup='{“controls”:true}’> <source src=”http://video-js.zencoder.com/oceans-clip.mp4″ type=’video/mp4′ /> <source src=”http://video-js.zencoder.com/oceans-clip.webm” type=’video/webm’ /> <source src=”http://video-js.zencoder.com/oceans-clip.ogv” […]

Create a FileList and copy it to a File input

I’m trying to create a drag and drop area that will get dataTransfer items by webkitGetAsEntry and check if the entry is a directory or file. I then would like to be able to make the files into a FileList and copy that to a file input (that will be validated and proccesed before posted). […]

Why did Safari drop support for SharedWorker?

Why did Safari drop support for SharedWorker? And are there any working polyfills using, for example, localStorage and StorageEvent as a communication port? (Yes, the shim would have to detect and recreate the master Worker)

please explain this requestAnimationFrame idiom

there are a lot of places (e.g. How to use requestAnimationFrame?) that fix window.requestAnimationFrame as below. I do not understand why the right hand side of the assignment is wrapped in to a function call. window.requestAnimFrame = (function(){ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback){ window.setTimeout(callback, 1000 / 60); }; […]

Multiple html5 canvas elements: performance issue?

Regardless of the javascript, is there a performance problem when adding multiple html5 canvas elements for the purpose of displaying canvas made icon? I mean is there a difference performancewise between a div and canvas sematic element? I am trying to step away from images, svg and even fontawesome, thats why im asking.

Issue with the flash fallback of VideoJs with Firefox

I have try to add videoJs to my site to play MP4 files, all works perfectly in Chrome but when I go to Firefox (which doesn’t support MP4 files) the flash player stay on a black screen and buttons do nothing. Simple question: why? I don’t understand, websites like vine.co or instagram use videoJs with […]

MP4 in HTML5 Video Tag Not Playing in Internet Explorer

Can anybody tell me why this is working for Firefox and Chrome, but not for IE9, 10, or 11? It’s giving me the typical black screen with a small white square containing a red X. <!DOCTYPE html> <html> <head> <title>HTML5 Video Player Test</title> </head> <body> <video style=”position:fixed; top:0px; left:0px; height:100%; width:100%;” autoplay controls> <source src=”./videos/video.mp4″ […]