05 Apr 2016

This article will take about 1 minute to read.
No comments

This is the one of my most popular repos. Once client asked for inline video that works on iPhone too. As Apple doesn’t allow that (all videos are full screen in native player, and autoplay is not supported),. There was no easy solution, so this player was born.

It uses HTML video and canvas. Script picks up the frame from the video and draws it on the canvas. For sound, there is audio element using video files (you can provide different audio file for it).

HTML canvas video player - Demo

Play, pause, jump to time and autoplay are all supported. But please check the documentation and demo.

You shouldn’t use this on any device that supports HTML video natively, but as a fallback.

Grab the code on GitHub.

Category
JavaScript

No comments, be the first to comment

Sending failed, please try again.
Thank you! Your comment is sent. Please note that all of the comments go through moderation.