2.0.3 • Published 2 years ago

qier-player v2.0.3

Weekly downloads
172
License
MIT
Repository
github
Last release
2 years ago

GitHub Travis (.org) npm package npm bundle size (version) GitHub stars

简体中文 | English

Introduction

Qier-player is a web video player component for React, It has a simple interface and smooth operation which supports the most functions of other video players. In addition, Qier-player can switch between video resolutions (4K, 2K, 1080P, 720P and 480P) if desired.

Keyboard Shortcuts

For these to work, the player must be in focus.

  • Up arrow key: Volume up
  • Down arrow key: Volume down
  • Left arrow key: Rewind 3 seconds
  • Right arrow key: Skip forward 3 seconds
  • Space key: Toggle play/pause

Here is an official demo site showing the player in use.

Screenshot

Screenshot of Qier Player

Quick Start

Install

npm install --save qier-player

Use

import React from 'react';
import ReactDOM from 'react-dom';
import QierPlayer from 'qier-player';

ReactDOM.render(<QierPlayer srcOrigin="Your video addedress" />, document.getElementById('root'));

API

ParameterDescriptionTypesDefaults
widthsetting the video width (e.g. 740 or "100%")number | string740
heightsetting the video height (e.g. 420 or "100%")number | string420
languagelanguage: 'en' is English and 'zh' is Chinese"en" | "zh"'en'
themeColortheme color (only supports hexadecimal color)string'#f23300'
isShowCurImgWhether to display the current framebooleanfalse
src480p480p source URLboolean | stringfalse
src1080p1080p source URLboolean | stringfalse
src720p720p source URLboolean | stringfalse
src2k2K source URLboolean | stringfalse
src4k4K source URLboolean | stringfalse
srcOriginorigin source URL (set this if not using specific resolution sources)boolean | stringfalse

Recent update history

1.2.3 (2019-11-06)

  • Added width and height api for setting your own video width and height

1.2.2 (2019-11-04)

  • Added theme colour modification interface
  • Added language change API, 'en' is English, 'zh' is Chinese

1.1.2 (2019-11-01)

  • Added auto hide function:When the mouse is hovering over the video page, the controller and mouse are hidden after 1.8s.

1.1.1 (2019-10-29)

  • Added the prompt "Sorry! The video could not be found (. ́< ̀.)" when the video source URL is not found
  • Added a hint animation "Buffering..." while the video is loading
  • Fixed a bug where custom shortcuts conflicted with browser shortcuts

Acknowledgements

  • Thanks to kaiseixd for his inspiration when I was in trouble.
  • Thanks to the screenfull plugin and the its author.
  • Thanks to fanzy for tranlsating README
  • Thanks to iconfont as an unselfish icon creator.
2.0.3

2 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.10

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago