GithubHelp home page GithubHelp logo

vortesnail / qier-player Goto Github PK

View Code? Open in Web Editor NEW
479.0 6.0 60.0 10.49 MB

:clapper: A simple and easy-to-use h5 video player with highly customizable UI and rich features. / 简单易用的h5播放器,UI 高度定制化,功能丰富。

Home Page: https://vortesnail.github.io/qier-player/

License: MIT License

JavaScript 14.71% Shell 0.07% SCSS 13.23% TypeScript 71.28% HTML 0.71%
vortesnail qier video-player video player react react-components html5-video-player qier-player react-video

qier-player's Introduction

qier-player


Gzip Size
简体中文 | English

Introduction

qier-player is a simple and easy-to-use h5 video player with highly customizable UI and rich features.

Screenshot

Quick Start

Install

npm package install:

npm install --save qier-player
# or
yarn add qier-player

Of course you can also use CDN service:

<script src="https://unpkg.com/qier-player@latest/dist/umd/index.min.js"></script>

Use

import Player from 'qier-player';

const player = new Player({
  src: 'https://vortesnail.github.io/qier-player-demo/static/media/video480p.d116ba09.mp4',
});
player.mount('#app');

Ecosystem

Name version gzip size
qier-player-for-react npm gzip size

Future features

  • @qier-player/vue for Vue developer.
  • @qier-player/danmaku plungin.

qier-player's People

Contributors

davwheat avatar dependabot[bot] avatar lihaogit avatar vortesnail avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

qier-player's Issues

试一下这个

https://github.com/vortesnail/qier-player/blob/e2bdcb46bc04beb6098d65023e013b6237be38ef/src/component/controls/index.js#L223-#L236

  handleChangePlayState() {
    if (this.state.isPlay) {
      this.props.videoRef.current.pause();
      this.setState({ isPlay: false });
      // 这条 return 语句必须的加,不然下面的代码也会执行。。
      // 黑科技。。
      // 不是说 setState 是异步吗???
      return;
    }
    if (!this.state.isPlay) {
      this.props.videoRef.current.play();
      this.setState({ isPlay: true });
    }
  }

你看看

 handleChangePlayState() {
    if (this.state.isPlay) {
      this.props.videoRef.current.pause();
      this.setState({ isPlay: false });
      // 这条 return 语句必须的加,不然下面的代码也会执行。。
      // 黑科技。。
      // 不是说 setState 是异步吗???     
    } else {
      this.props.videoRef.current.play();
      this.setState({ isPlay: true });
    }
  }

或者

 handleChangePlayState() {
    this.setState(preState => {
      if (preState.isPlay) {
        this.props.videoRef.current.pause();
      } else {
        this.props.videoRef.current.play();
      }
      return { isPlay: !preState.isPlay };
    });
  }

Unable to change src

I use src as a state. When I change the state, do not reload the video. Now, what must I do. Thank you
image

不相关的ISSUES

虽然不该提,但是还是想知道示例里的视频是叫什么名字。

Control buttons visibility options

Can we have option to remove or add the control buttons individually, for example, I don't want the Play rate option. so can I be able to remove it?

I hope this will indeed a great feature to have the options customized.

events in the module

I want to capture events when the video starts to play and when the video is finished, how do I do it?
Also, is there a way for me to continue watching the video from the previous preview?
Thank you

打包优化

在你的webpack的optimization中加入以下代码
splitChunks: {
chunks: 'all',
name: false,
},

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.