Bladeren bron

docs: update

DIYgod 6 jaren geleden
bovenliggende
commit
4adab30fcb
4 gewijzigde bestanden met toevoegingen van 32 en 0 verwijderingen
  1. 1 0
      README.md
  2. 29 0
      docs/README.md
  3. 1 0
      docs/ecosystem.md
  4. 1 0
      docs/zh-Hans/ecosystem.md

+ 1 - 0
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
 

+ 29 - 0
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
+<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`.

+ 1 - 0
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
 

+ 1 - 0
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