From 4adab30fcb1d9b57b54ddf7c023eb20e8b3ec2db Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 6 Jun 2019 16:41:20 +0800 Subject: [PATCH] docs: update --- README.md | 1 + docs/README.md | 29 +++++++++++++++++++++++++++++ docs/ecosystem.md | 1 + docs/zh-Hans/ecosystem.md | 1 + 4 files changed, 32 insertions(+) diff --git a/README.md b/README.md index c92a896..48b688d 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/README.md b/docs/README.md index 2f5ae8a..32d484a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 + +
+ + +``` + +```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`. diff --git a/docs/ecosystem.md b/docs/ecosystem.md index 55fe942..24701ea 100644 --- a/docs/ecosystem.md +++ b/docs/ecosystem.md @@ -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 diff --git a/docs/zh-Hans/ecosystem.md b/docs/zh-Hans/ecosystem.md index 0227a05..9d5aa8f 100644 --- a/docs/zh-Hans/ecosystem.md +++ b/docs/zh-Hans/ecosystem.md @@ -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