mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 18:41:20 -08:00
add artplayer-plugin-blur
This commit is contained in:
1 parent
e26f43e243
commit
950d6a3b3a
12 files changed
+1714
-1418
No files matched your search
@@ -0,0 +1,62 @@
|
||||
# artplayer-plugin-blur
|
||||
|
||||
Blur plugin for ArtPlayer
|
||||
|
||||
## Demo
|
||||
|
||||
[Checkout the demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-blur.js&example=blur) from Github Pages
|
||||
|
||||
## Install
|
||||
|
||||
Install with `npm`
|
||||
|
||||
```
|
||||
$ npm install artplayer-plugin-blur
|
||||
```
|
||||
|
||||
Or install with `yarn`
|
||||
|
||||
```
|
||||
$ yarn add artplayer-plugin-blur
|
||||
```
|
||||
|
||||
```js
|
||||
import artplayerPluginBlur from 'artplayer-plugin-blur';
|
||||
```
|
||||
|
||||
Or umd builds are also available
|
||||
|
||||
```html
|
||||
<script src="artplayer-plugin-blur.js"></script>
|
||||
```
|
||||
|
||||
Will expose the global variable to `window.artplayerPluginBlur`.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: 'path/to/video.mp4',
|
||||
layers: [
|
||||
{
|
||||
style: {
|
||||
position: 'absolute',
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
width: '200px',
|
||||
height: '200px',
|
||||
margin: '-100px 0 0 -100px',
|
||||
},
|
||||
mounted($layer) {
|
||||
art.plugins.artplayerPluginBlur.attach($layer);
|
||||
},
|
||||
},
|
||||
],
|
||||
plugins: [artplayerPluginBlur],
|
||||
});
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Harvey Zack](https://sleepy.im/)
|
||||
Reference in new issue
Block a user