mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-18 10:41:20 -08:00
build all packages
This commit is contained in:
1 parent
7c72e3ecd8
commit
429330a7e2
10 files changed
+3215
No files matched your search
@@ -0,0 +1,9 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
test
|
||||
coverage
|
||||
.nyc_output
|
||||
.cache
|
||||
docs
|
||||
@@ -0,0 +1 @@
|
||||
package-lock=false
|
||||
@@ -0,0 +1,80 @@
|
||||
# artplayer-plugin-danmu
|
||||
Danmu plugin for ArtPlayer
|
||||
|
||||
## Demo
|
||||
|
||||
[Checkout the demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-danmu.js&example=danmu) from Github Pages
|
||||
|
||||
## Install
|
||||
|
||||
Install with `npm`
|
||||
|
||||
```
|
||||
$ npm install artplayer-plugin-danmu
|
||||
```
|
||||
|
||||
Or install with `yarn`
|
||||
|
||||
```
|
||||
$ yarn add artplayer-plugin-danmu
|
||||
```
|
||||
|
||||
```js
|
||||
import artplayerPluginBacklight from 'artplayer-plugin-danmu';
|
||||
```
|
||||
|
||||
Or umd builds are also available
|
||||
|
||||
```html
|
||||
<script src="artplayer-plugin-danmu.js"></script>
|
||||
```
|
||||
|
||||
Will expose the global variable to `window.artplayerPluginDanmu`.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: 'path/to/video.mp4',
|
||||
plugins: [artplayerPluginDanmu({
|
||||
danmus: [], // Can be an array or return the promised function or danmuku xml url
|
||||
speed: 5, // Animation time
|
||||
opacity: 1, // Opacity
|
||||
color: '#fff', // Font color
|
||||
size: 25, // Font size
|
||||
maxlength: 50, // The maximum number of words in the danmu
|
||||
margin: [10, 20], // Margin top and margin bottom
|
||||
})],
|
||||
});
|
||||
|
||||
// Send danmu
|
||||
art.plugins.artplayerPluginDanmu.emit({
|
||||
text: '666', // Danmu text
|
||||
time: 5, // Video time
|
||||
color: '#fff', // Danmu color
|
||||
size: 25, // Danmu size
|
||||
border: '#fff' // Danmu border color
|
||||
});
|
||||
|
||||
// Start danmu
|
||||
art.plugins.artplayerPluginDanmu.start();
|
||||
|
||||
// Stop danmu
|
||||
art.plugins.artplayerPluginDanmu.stop();
|
||||
|
||||
// Hide danmu
|
||||
art.plugins.artplayerPluginDanmu.hide();
|
||||
|
||||
// Show danmu
|
||||
art.plugins.artplayerPluginDanmu.show();
|
||||
|
||||
// Config danmu
|
||||
art.plugins.artplayerPluginDanmu.config({
|
||||
// option
|
||||
});
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Harvey Zack](https://sleepy.im/)
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "artplayer-tool-github",
|
||||
"version": "3.1.7",
|
||||
"description": "Github tool for ArtPlayer",
|
||||
"main": "dist/artplayer-tool-github.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||
},
|
||||
"keywords": [
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||
},
|
||||
"homepage": "https://github.com/zhw2590582/ArtPlayer#readme",
|
||||
"dependencies": {
|
||||
"issues-danmuku": "^1.0.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import ArtplayerToolGithub from 'issues-danmuku/src';
|
||||
|
||||
window.ArtplayerToolGithub = ArtplayerToolGithub;
|
||||
export default ArtplayerToolGithub;
|
||||
Reference in new issue
Block a user