docs: update

This commit is contained in:
DIYgod 2019-06-06 16:41:20 +08:00
parent de9b88609a
commit 4adab30fcb
No known key found for this signature in database
GPG Key ID: EC0B76A252D3EF67
4 changed files with 32 additions and 0 deletions

View File

@ -96,6 +96,7 @@ Feel free to submit yours in [`Let me know!`](https://github.com/MoePlayer/DPlay
- [DPlayer for Discuz!](https://coding.net/u/Click_04/p/video/git): Discuz!
- [DPlayer for WordPress](https://github.com/BlueCocoa/DPlayer-WordPress): WordPress
- [DPlayerHandle](https://github.com/kn007/DPlayerHandle): WordPress
- [Selection](https://github.com/GreatSatan79/Selection): WordPress
- [Vue-DPlayer](https://github.com/sinchang/vue-dplayer): Vue
- [react-dplayer](https://github.com/hnsylitao/react-dplayer): React

View File

@ -506,6 +506,35 @@ const dp = new DPlayer({
});
```
### MPEG DASH (Shaka)
It requires the library [shaka-player](https://github.com/google/shaka-player) and it should be loaded before `DPlayer.min.js`.
```html
<link rel="stylesheet" href="DPlayer.min.css">
<div id="dplayer"></div>
<script src="shaka-player.compiled.js"></script>
<script src="DPlayer.min.js"></script>
```
```js
const dp = new DPlayer({
container: document.getElementById('dplayer'),
screenshot: true,
video: {
url: 'demo.mpd',
type: 'shakaDash',
customType: {
'shakaDash': function (video, player) {
var src = video.src;
var playerShaka = new shaka.Player(video); // 将会修改 video.src
playerShaka.load(src);
}
}
}
});
```
### FLV
It requires the library [flv.js](https://github.com/Bilibili/flv.js) and it should be loaded before `DPlayer.min.js`.

View File

@ -37,6 +37,7 @@ Let's make DPlayer better, feel free to submit yours in [`Let me know!`](https:/
- [DPlayer for Discuz!](https://coding.net/u/Click_04/p/video/git): Discuz!
- [DPlayer for WordPress](https://github.com/BlueCocoa/DPlayer-WordPress): WordPress
- [DPlayerHandle](https://github.com/kn007/DPlayerHandle): WordPress
- [Selection](https://github.com/GreatSatan79/Selection): WordPress
- [Vue-DPlayer](https://github.com/sinchang/vue-dplayer): Vue
- [react-dplayer](https://github.com/hnsylitao/react-dplayer): React

View File

@ -38,6 +38,7 @@ search: zh-Hans
- [DPlayer for Discuz!](https://coding.net/u/Click_04/p/video/git): Discuz!
- [DPlayer for WordPress](https://github.com/BlueCocoa/DPlayer-WordPress): WordPress
- [DPlayerHandle](https://github.com/kn007/DPlayerHandle): WordPress
- [Selection](https://github.com/GreatSatan79/Selection): WordPress
- [Vue-DPlayer](https://github.com/sinchang/vue-dplayer): Vue
- [react-dplayer](https://github.com/hnsylitao/react-dplayer): React