Giter Site home page Giter Site logo

cnbrucelee / videoui Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 16.27 MB

HTML5 Video是现在HTML5 最流行的功能之一,得到了大多数最新版本的浏览器支持,但在不同浏览器访问时样式不统一,我们制作自定义视频控件为了在所有的浏览器中有一个相同的视频控件而不受默认视频控件的控制。

License: Apache License 2.0

CSS 1.12% JavaScript 95.67% HTML 2.34% Less 0.86%

videoui's Introduction

videoUI

HTML5 Video是现在HTML5 最流行的功能之一,得到了大多数最新版本的浏览器支持,也正是如此,在不同浏览器提供了不同的视频样式,在不同浏览器访问时样式不统一,我们制作自定义视频控件为了在所有的浏览器中有一个相同的视频控件而不受默认视频控件的控制。

videoUI是一个轻量级的前端控件,在不同浏览器下提供统一样式与操作。

AUR

演示

demo0

实现的内容

  • 视频的播放/暂停
  • 时长与当前进度
  • 清晰度切换
  • 播放速度
  • 音量调节
  • 网页全屏
  • 全屏
  • 画中画播放
  • 语言选择
  • 键盘左右键快进
  • 键盘上下键调节音量
  • 加载中显示加载图标
  • 消息提示

2021-06-06更新

  • 键盘空格键暂停与播放

样例

<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="shortcut icon" href="../media/images/favicon.ico" type="image/x-icon">
    <title>videoUI</title>
    <!-- 1、引入CSS -->
	<link href="../css/videoUI.css" rel="stylesheet"></head>
<body>
<div class="container">
    <!--2、video的容器 -->
    <div class="video-ui" style="width: 720px;height: 480px;margin: 10px auto"></div>
</div>
<!-- 3、引入JS -->
<script type="text/javascript" src="../js/videoUI.js"></script></body>
<script>
    //4、创建videoUI实例
    var vui = new VideoUI({//5、配置对象
        el: ".video-ui",
        qualityData: [{
            name: "4K",
            src: "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4",
            type: "video/mp4"
        }],
    });
</script>
</html>

帮助文档 GitHub

帮助文档 Gitee

相关资源

源码 GitHub

源码 Gitee

喜欢的点赞、收藏,你的支持就是我的动力!!!

videoui's People

Contributors

cnbrucelee avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.