canvas
VR mode FullscreenFörkortningar
- ctx - Context
Tagg i HTML
canvas
Rendera en HTML-video på Canvas med JavaScript
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
var video = document.getElementById('video');
video.addEventListener('play', function() {
var $this = this; //cache
(function loop() {
if (!$this.paused && !$this.ended) {
ctx.drawImage($this, 0, 0);
setTimeout(loop, 1000 / 30); // drawing at 30fps
}
})();
}, 0);
canvas = document.createElement('canvas');
ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
alert(ctx.getSupportedExtensions());
How can I enable WebGL in my browser?
HTML5 load a png buffer into a canvas (for streaming purpose)
Teknik
Programmeringsspråk
Länkar
Kuriosa
Externa länkar
- Canvas paint.org
- Apple.com Developer Library Content Documentation AudioVideo Conceptual HTML canvas guide PuttingVideoonCanvas
- HTML5 doctor.com Video canvas magic
- Stackoverflow.com Questions Resize HTML5 canvas to fit window
- Stackoverflow.com Questions HTML5 display video inside canvas
- Stackoverflow.com Questions Regexp matching string not starting with my
- Mozilla.org Developer Docs Web API Canvas API