xgplayer 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,9 +5,6 @@
5
5
  <a href="https://www.npmjs.com/package/xgplayer" target="_blank">
6
6
  <img src="https://img.shields.io/npm/v/xgplayer.svg" alt="npm">
7
7
  </a>
8
- <a href="https://www.npmjs.com/package/xgplayer">
9
- <img src="https://img.shields.io/npm/dm/xgplaer.svg" alg="download">
10
- </a>
11
8
  <a href="https://www.npmjs.com/package/xgplayer" target="_blank">
12
9
  <img src="https://img.shields.io/npm/l/xgplayer.svg" alt="license">
13
10
  </a>
@@ -19,14 +16,14 @@
19
16
 
20
17
  ### Introduction
21
18
 
22
- xgplayer is a web video player library. it has designed a separate, detachable UI component based on the principle that everything is componentized. More importantly, it is not only flexible in the UI layer, but also bold in its functionality: it gets rid of video loading, buffering, and format support for video dependence. Especially on mp4
23
- it can be staged loading for that does not support streaming mp4. This means seamless switching with clarity, load control, and video savings. It also integrates on-demand and live support for FLV, HLS, and dash. [Document](http://h5player.bytedance.com/)
19
+ xgplayer is a web video player library. It has designed a separate, detachable UI component based on the principle that everything is componentized. More importantly, it is not only flexible in the UI layer, but also bold in its functionality: it gets rid of video loading, buffering, and format support for video dependence. Especially on mp4
20
+ it can be staged loading for that does not support streaming mp4. This means seamless switching with clarity, load control, and video savings. It also integrates on-demand and live support for FLV, HLS, and dash. [Document](http://h5player.bytedance.com/en/)
24
21
 
25
22
  ### Start
26
23
 
27
24
  1. Install
28
25
 
29
- ```
26
+ ```bash
30
27
  $ npm install xgplayer
31
28
  ```
32
29
 
@@ -48,51 +45,37 @@ it can be staged loading for that does not support streaming mp4. This means sea
48
45
  })
49
46
  ```
50
47
 
51
- This is the easiest way to configure the player,then it runs with video. For more advanced content, see the plug-in section or documentation. [more config](http://h5player.bytedance.com/config.html)
48
+ This is the easiest way to configure the player, then it runs with video. For more advanced content, see the plug-in section or documentation. [more config](http://h5player.bytedance.com/en/config/)
52
49
 
53
50
 
54
51
 
55
52
 
56
53
  ### Plugins
57
54
 
58
- xgplayer provides more plugins, plugins are divided into two categories: one is self-starting, and another inherits the player's core class named xgplayer. In principle, the officially provided plug-ins are self-starting and the packaged third-party libraries are inherited. Some feature plug-ins themselves can provide a downgrade scenario that suggests a self-start approach, or an inheritance approach if not. The player supports custom plugins for more content viewing [plugins](http://h5player.bytedance.com/)
59
-
60
- The following is how to use a self-starting plug-in:
61
-
62
- ```js
63
- import Player from 'xgplayer';
64
- import 'xgplyaer-mp4';
65
-
66
- const player = new Player({
67
- id: 'video',
68
- url: '//abc.com/test.mp4'
69
- })
70
- ```
71
-
72
- <code>xgplayer-mp4</code>plugin is self-starting, It loads mp4 video itself, parses mp4 format, implements custom loading, buffering, seamless switching, and so on. it will automatically downgrade devices that do not support [MSE](https://www.w3.org/TR/media-source/). [details](http://h5player.bytedance.com/plugins/#xgplayer-mp4)
73
-
74
-
75
-
76
- ### Mobile Support
77
-
78
- xgplayer supports mobile terminal, but android device brand and system are numerous, there are much compatibility problems, the player provides whitelist mechanism to ensure the perfect operation in mobile terminal. [whitelist](http://h5player.bytedance.com/config/#%E7%99%BD%E5%90%8D%E5%8D%95)
79
-
55
+ xgplayer provides more plugins and supports custom plugins, for more content viewing [plugins](http://h5player.bytedance.com/en/plugins/). There are many built-in plugins in the player, if you need to close specific plugins, you can disable them by [ignores](https://h5player.bytedance.com/config/#ignores) configuration
80
56
 
81
57
 
82
58
  ### Dev
83
59
 
84
- For debugging, we provide the example video resource which size is large in github. You can clone the whole git repository which includes codes and example videos with 'git clone --recurse-submodules -j8'. With 'git clone' you will pull only codes of xgplayer and its plugins.
60
+ In order to debug by developers, we provide demos code in the fixtures directory of the repo. The player uses yarn for package management, and it only takes a few simple steps to start debugging in the repo
85
61
 
86
- ```
87
- $ git clone --recurse-submodules -j8 git@github.com:bytedance/xgplayer.git # OR git clone git@github.com:bytedance/xgplayer.git
62
+ ```bash
88
63
  $ cd xgplayer
89
- $ npm install
90
- $ npm run dev
64
+ $ yarn
65
+ $ yarn dev:xgplayer
91
66
  ```
92
67
 
93
- please visit [http://localhost:9090/examples/index.html](http://localhost:9090/examples/index.html)
68
+ To debug other plugins, please refer to the scripts command provided in package.json in the root directory of the repo, such as:
94
69
 
70
+ ```bash
71
+ $ yarn dev:hls
72
+ $ yarn dev:flv
73
+ $ yarn dev:mp4
74
+ ```
95
75
 
96
76
  ### License
97
77
 
98
- [MIT](http://opensource.org/licenses/MIT)
78
+ Welcome to use xgplayer! Please read the following terms carefully. Using xgplayer means that you accept and agree to the terms.
79
+ 1. Xgplayer is licensed under the [MIT](http://opensource.org/licenses/MIT) License. You comply with its obligations by default.
80
+ 2. By default, you authorize us to place your logo in xgplayer website, which using xgplayer.
81
+ If you have any problem, please let us know.