Rishi Rathor has Published 155 Articles

Display video inside HTML5 canvas

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:22

289 Views

You can try the following code snippet to display video inside HTML5 canvas.var canvas1 = document.getElementById('canvas'); var context = canvas1.getContext('2d'); var video = document.getElementById('video'); video.addEventListener('play', function () { var $this = this; (function loop() { if (!$this.paused && !$this.ended) { context.drawImage($this, 0, 0); setTimeout(loop, 1000 / 30); } })(); }, 0);

CSS Grid Rows

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:22

135 Views

The horizontal line in the following is called Grid Rows.

Storing Credentials in Local Storage

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:22

861 Views

The Local Storage is designed for storage that spans multiple windows and lasts beyond the current session. In particular, Web applications may wish to store megabytes of user data, such as entire user-authored documents or a user's mailbox, on the client side for performance reasons.For storing credentials in local storage, ... Read More

How to trust backward compatibility with HTML5

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:22

98 Views

HTML5 is designed, as much as possible, to be backward compatible with existing web browsers. New features build on existing features and allow you to provide fallback content for older browsers.It is suggested to detect support for individual HTML5 features using a few lines of JavaScript.The latest versions of Apple ... Read More

Why accessing an array out of bounds does not give any error in C++?

Rishi Rathor

Rishi Rathor

Updated on 30-Jul-2019 22:30:22

1K+ Views

This is due to the fact that C++ does not do bounds checking. Languages like Java and python have bounds checking so if you try to access an out of bounds element, they throw an error. C++ design principle was that it shouldn't be slower than the equivalent C code, ... Read More

Advertisements