Coder Social home page Coder Social logo

videotocanvas's Introduction

VideoToCanvas

video转canvas.方便移动端的视频控制.

目前主流有两种方法处理移动端的视频播放问题:

一种是改设计和说服需求方,即使视频不能自动播放或者置顶也不影响页面展示的主要体验;

另一种便是使用canvas来替代video。

看起来,canvas像是完美的,没有浏览器厂商任性的植入属性,任由开发者打扮。但是经我们测试后,其实有些低端的Android手机可能会出现卡顿和动画变糊的情况。如果不考虑一些低端手机,还是很值得实践的。

video转canvas的主要原理,是将视频播放的每一帧都绘制到一个canvas中,这样这个canvas连起来看便像是视频动画了。

为了方便日常开发使用,特意稍微封装了一下video转canvas的工具库。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.