Browse Source

Merge pull request #1365 from EzraRT/patch-1

更改dashjs调用方式
EzraRT 1 month ago
parent
commit
3fd7896375
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/js/player.js

+ 2 - 1
src/js/player.js

@@ -435,7 +435,8 @@ class DPlayer {
                 // https://github.com/Dash-Industry-Forum/dash.js
                 case 'dash':
                     if (window.dashjs) {
-                        const dashjsPlayer = window.dashjs.MediaPlayer().create().initialize(video, video.src, false);
+                        const dashjsPlayer = window.dashjs.MediaPlayer().create();
+                        dashjsPlayer.initialize(video, video.src, false, 0);
                         const options = this.options.pluginOptions.dash;
                         dashjsPlayer.updateSettings(options);
                         this.plugins.dash = dashjsPlayer;