Giter Site home page Giter Site logo

videoui's Introduction

videoUI

  • videoUI 视频切换播放和全屏播放 微信小程序

解决痛点:

  • video的src默认为空,解决了viode自动下载的bug

    • 加快页面加载速度,为用户节省流量
  • custom-cache="{{false}}"

    • 解决视频缓存中卡住的问题
<video id="wxParse{{item.index}}" src="{{srcs['wxParse'+item.index]}}" class="wxParse-video-video" poster="{{item.attr.cover}}" bindplay="bindplay_video" data-id="wxParse{{item.index}}" custom-cache="{{false}}">
	<cover-view class="controls" hidden="{{srcs['wxParse'+item.index]}}" bindtap="bindplay" data-id="wxParse{{item.index}}" data-src="{{item.attr.src}}">
	</cover-view>
</video>
  • 视频全屏播放

    • 解决iPhone X兼容问题
    • 视频全屏播放
  • 视频切换播放

     Object.keys(contextData).forEach(function (val, key) {
         if (id != val) {
           contextData[val].pause();
           that.setData({
             old_vid: id
           })
         }
     })
    • 自动暂停上一个视频

说明:

  • 我们贝壳亲子英语小程序,经过多版本迭代,优化了视频体验流程,这个项目是从实际项目抽离出的精华

  • 喜欢请start,您的支持就是我的动力…

  • 项目地址: https://github.com/mrzhang90/videoUI

videoui's People

Contributors

mrzhang90 avatar

Watchers

 avatar  avatar

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.