diff --git a/README.md b/README.md index 3db2f1058..b6826a3a3 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,17 @@ > ArtPlayer is a modern HTML5 video player -## Status +## Introduction -⚠️ This project is WIP and not ready for production use yet! +> TODO... ## Demo -[Checkout the demo](https://blog.zhw-island.com/ArtPlayer/) +[Checkout the demo](https://blog.zhw-island.com/ArtPlayer/lab) -## Introduction +## Document + +[Checkout the Document](https://blog.zhw-island.com/ArtPlayer/docs) ## Install @@ -55,1041 +57,6 @@ var art = new Artplayer({ | ------------------------------------------------------------------------------------------------------------- | -------------------------- | | [artplayer-plugin-danmu](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-danmu) | Danmu plugin for ArtPlayer | -## Configuration - -
| parameter | -description | -example | -||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
container |
-
- Type: string, element- Default: .artplayer- Required: true- DOM container of the player, you need to initialize a size for the container element - |
- - Demo - | -||||||||||||||
url |
-
- Type: string- Default: ''- Required: true- Video source url, Three video file formats are supported: mp4, ogg, webm
- |
- - Demo - | -||||||||||||||
poster |
-
- Type: string- Default: ''- Video poster image url - |
- - Demo - | -||||||||||||||
title |
-
- Type: string- Default: ''- Video title, will be shown in screenshot file name and pip mode
- |
- - Demo - | -||||||||||||||
volume |
-
- Type: number- Default: 0.7- Default volume, player will cache the last volume, which may be overwritten - |
- - Demo - | -||||||||||||||
autoplay |
-
- Type: boolean- Default: false- Whether to play automatically, sometimes it doesn't necessarily succeed - More info: autoplay-policy-changes - |
- - Demo - | -||||||||||||||
autoSize |
-
- Type: boolean- Default: false- Keep the original video aspect ratio and automatically zoom - |
- - Demo - | -||||||||||||||
loop |
-
- Type: boolean- Default: false- Automatic loop playback - |
- - Demo - | -||||||||||||||
playbackRate |
-
- Type: boolean- Default: false- Whether to show playback rate controller in the contextmenu - |
- - Demo - | -||||||||||||||
aspectRatio |
-
- Type: boolean- Default: false- Whether to show aspect ratio controller in the contextmenu - |
- - Demo - | -||||||||||||||
screenshot |
-
- Type: boolean- Default: false- Whether to show screenshot controller in the bottom - |
- - Demo - | -||||||||||||||
setting |
-
- Type: boolean- Default: false- Whether to show setting controller in the bottom - |
- - Demo - | -||||||||||||||
pip |
-
- Type: boolean- Default: false- Whether to show pip controller in the bottom - |
- - Demo - | -||||||||||||||
fullscreen |
-
- Type: boolean- Default: false- Whether to show window fullscreen controller in the bottom - |
- - Demo - | -||||||||||||||
fullscreenWeb |
-
- Type: boolean- Default: false- Whether to show web page fullscreen controller in the bottom - |
- - Demo - | -||||||||||||||
hotkey |
-
- Type: boolean- Default: true- Whether to use hotkey -
|
- - Demo - | -||||||||||||||
mutex |
-
- Type: boolean- Default: true- Player mutually exclusive, only one player can play at a time - |
- - Demo - | -||||||||||||||
lang |
-
- Type: string- Default: navigator.language.toLowerCase()- Default display language: en, zh-cn, zh-tw
- |
- - Demo - | -||||||||||||||
theme |
-
- Type: string- Default: #f00- Default theme color - |
- - Demo - | -||||||||||||||
subtitle |
-
- Type: object- Default: {}- Custom subtitle -
|
- - Demo - | -||||||||||||||
thumbnails |
-
- Type: object- Default: {}- Custom thumbnails in the progress bar with lazy load -
|
- - Demo - | -||||||||||||||
moreVideoAttr |
-
- Type: object- Default: {'controls': false,'preload': 'auto'}- More video Attributes, these properties will be written directly to the video element - |
- - Demo - | -||||||||||||||
quality |
-
- Type: array- Default: []- Custom quality, The type of quality is an object -
|
- - Demo - | -||||||||||||||
highlight |
-
- Type: array- Default: []- Custom highlight, The type of highlight is an object -
|
- - Demo - | -||||||||||||||
layers |
-
- Type: array- Default: []- Custom layer, The type of layer is an object or function-
|
- - Demo - | -||||||||||||||
contextmenu |
-
- Type: array- Default: []- Custom contextmenu, The type of layer is an object or function-
|
- - Demo - | -||||||||||||||
controls |
-
- Type: array- Default: []- Custom controls, The type of controls is an object -
|
- - Demo - | -
| property | -description | -example | -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
destroy |
-
- Type: function- Parameter: true/false- Destroy instance, and whether to remove dom - |
- - Demo - | -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
player |
-
- Type: object- Player core function -
|
- null |
-
| property | -description | -example | -
|---|---|---|
Artplayer.version |
- - Version Information - | -- |
Artplayer.config |
- - Configuration information - | -- |
Artplayer.utils |
- - Common utils - | -- |
Artplayer.DEFAULTS |
- - Default configuration - | -- |
Artplayer.use() |
- - Function to load plugin - | -- |
| parameter | +description | +example | +||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
container |
+
+ Type: string, element+ Default: .artplayer+ Required: true+ DOM container of the player, you need to initialize a size for the container element + |
+ + Demo + | +||||||||||||||
url |
+
+ Type: string+ Default: ''+ Required: true+ Video source url, Three video file formats are supported: mp4, ogg, webm
+ |
+ + Demo + | +||||||||||||||
poster |
+
+ Type: string+ Default: ''+ Video poster image url + |
+ + Demo + | +||||||||||||||
title |
+
+ Type: string+ Default: ''+ Video title, will be shown in screenshot file name and pip mode
+ |
+ + Demo + | +||||||||||||||
volume |
+
+ Type: number+ Default: 0.7+ Default volume, player will cache the last volume, which may be overwritten + |
+ + Demo + | +||||||||||||||
autoplay |
+
+ Type: boolean+ Default: false+ Whether to play automatically, sometimes it doesn't necessarily succeed + More info: autoplay-policy-changes + |
+ + Demo + | +||||||||||||||
autoSize |
+
+ Type: boolean+ Default: false+ Keep the original video aspect ratio and automatically zoom + |
+ + Demo + | +||||||||||||||
loop |
+
+ Type: boolean+ Default: false+ Automatic loop playback + |
+ + Demo + | +||||||||||||||
playbackRate |
+
+ Type: boolean+ Default: false+ Whether to show playback rate controller in the contextmenu + |
+ + Demo + | +||||||||||||||
aspectRatio |
+
+ Type: boolean+ Default: false+ Whether to show aspect ratio controller in the contextmenu + |
+ + Demo + | +||||||||||||||
screenshot |
+
+ Type: boolean+ Default: false+ Whether to show screenshot controller in the bottom + |
+ + Demo + | +||||||||||||||
setting |
+
+ Type: boolean+ Default: false+ Whether to show setting controller in the bottom + |
+ + Demo + | +||||||||||||||
pip |
+
+ Type: boolean+ Default: false+ Whether to show pip controller in the bottom + |
+ + Demo + | +||||||||||||||
fullscreen |
+
+ Type: boolean+ Default: false+ Whether to show window fullscreen controller in the bottom + |
+ + Demo + | +||||||||||||||
fullscreenWeb |
+
+ Type: boolean+ Default: false+ Whether to show web page fullscreen controller in the bottom + |
+ + Demo + | +||||||||||||||
hotkey |
+
+ Type: boolean+ Default: true+ Whether to use hotkey +
|
+ + Demo + | +||||||||||||||
mutex |
+
+ Type: boolean+ Default: true+ Player mutually exclusive, only one player can play at a time + |
+ + Demo + | +||||||||||||||
lang |
+
+ Type: string+ Default: navigator.language.toLowerCase()+ Default display language: en, zh-cn, zh-tw
+ |
+ + Demo + | +||||||||||||||
theme |
+
+ Type: string+ Default: #f00+ Default theme color + |
+ + Demo + | +||||||||||||||
subtitle |
+
+ Type: object+ Default: {}+ Custom subtitle +
|
+ + Demo + | +||||||||||||||
thumbnails |
+
+ Type: object+ Default: {}+ Custom thumbnails in the progress bar with lazy load +
|
+ + Demo + | +||||||||||||||
moreVideoAttr |
+
+ Type: object+ Default: {'controls': false,'preload': 'auto'}+ More video Attributes, these properties will be written directly to the video element + |
+ + Demo + | +||||||||||||||
quality |
+
+ Type: array+ Default: []+ Custom quality, The type of quality is an object +
|
+ + Demo + | +||||||||||||||
highlight |
+
+ Type: array+ Default: []+ Custom highlight, The type of highlight is an object +
|
+ + Demo + | +||||||||||||||
layers |
+
+ Type: array+ Default: []+ Custom layer, The type of layer is an object or function+
|
+ + Demo + | +||||||||||||||
contextmenu |
+
+ Type: array+ Default: []+ Custom contextmenu, The type of layer is an object or function+
|
+ + Demo + | +||||||||||||||
controls |
+
+ Type: array+ Default: []+ Custom controls, The type of controls is an object +
|
+ + Demo + | +