Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Play inline videos on iPhone with HTML canvas player.

A quick and easy way to generate markup for mailto links without having to worry about the annoying formatting.
HTML Canvas Video Player is a deprecated, dependency-free JavaScript library that renders video into an HTML canvas, allowing videos to play inline on iPhones instead of opening the native fullscreen player. The project, which lives on GitHub and currently has 427 stars, was created as a workaround for the pre-iOS-10 era when mobile Safari forced video to fullscreen; it is no longer actively maintained because iOS 10 and later natively support the playsinline attribute.
HTML Canvas Video Player is a plain JavaScript class that plays video on an HTML canvas element. It accepts a video element and a canvas, then draws each frame of the video onto the canvas using the Canvas API, while audio continues through the original video element. The library works on IE9+ and modern browsers, though the author states it was intended primarily for iPhone use. The documentation and a live demo are hosted at stanko.github.io/html-canvas-video-player, and the GitHub project has attracted 427 stars.
HTML Canvas Video Player is aimed at web developers who need inline video playback on iPhones without the native player, especially those supporting iOS versions prior to 10. It also suits developers building custom video players that require canvas-level manipulation (overlays, drawing on frames, or CSS compositing). Hobbyist and professional front-end developers who want a lightweight, dependency-free video component for a legacy mobile web project will find this useful.
The player attaches to an existing video element and a canvas element. On each animation frame, it copies the current video frame to the canvas using the Canvas API, while the audio still plays through the video element to stay in sync. This gives the appearance of the video playing inside the canvas, independent of native iOS video controls.
No. As of iOS 10, Safari natively supports the playsinline attribute on video elements, making the canvas workaround unnecessary. The project author has officially deprecated it and recommends using native HTML video instead. The repository is not actively maintained, but the author invites anyone who wants to take over to open an issue and become a contributor.
The project was designed for the old iOS behavior that forced videos into fullscreen. With iOS 10, Apple added native support for the playsinline attribute, allowing videos to play inline without any JavaScript workaround, so the library is no longer needed.
It's a plain JavaScript class that renders a video onto an HTML canvas element so the video can play inline on iPhones. It takes a video and a canvas, draws each frame onto the canvas, and keeps audio in sync.
The README notes that "Android works for ages now," meaning inline video is natively supported on Android, so the canvas player is unnecessary there. The library was intended for iPhone only.
Use a standard HTML video element with the playsinline attribute. Since iOS 10, Safari honors this attribute, so videos play inline rather than launching the native fullscreen player.
HTML Canvas Video Player supports IE9 and above plus all modern browsers. However, it was created for iPhone usage on older iOS versions, so on other platforms you'll typically just use native video.
