diff --git a/docs/.vuepress/components/DPlayer.vue b/docs/.vuepress/components/DPlayer.vue index 4273e53..52b9729 100644 --- a/docs/.vuepress/components/DPlayer.vue +++ b/docs/.vuepress/components/DPlayer.vue @@ -71,12 +71,12 @@ export default { methods: { load: function () { this.options.container = this.$refs.dplayer; - this.dplayer = new DPlayer(this.options); + this.dplayer = new window.DPlayer(this.options); } }, mounted: function () { if (this.immediate) { - this.dplayer = new DPlayer(this.options); + this.dplayer = new window.DPlayer(this.options); } }, beforeDestroy: function () { diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 2471cda..f7c647e 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -30,7 +30,14 @@ module.exports = { description: '🍭 Wow, such a lovely HTML5 danmaku video player', }, }, - head: [['link', { rel: 'icon', href: `/logo.png` }]], + head: [ + ['link', { rel: 'icon', href: `/logo.png` }], + ['script', { src: 'https://cdn.jsdelivr.net/npm/flv.js/dist/flv.min.js' }], + ['script', { src: 'https://cdn.jsdelivr.net/npm/hls.js/dist/hls.min.js' }], + ['script', { src: 'https://cdn.jsdelivr.net/npm/dashjs/dist/dash.all.min.js' }], + ['script', { src: 'https://cdn.jsdelivr.net/webtorrent/latest/webtorrent.min.js' }], + ['script', { src: 'https://cdn.jsdelivr.net/npm/dplayer/dist/DPlayer.min.js' }], + ], themeConfig: { repo: 'MoePlayer/DPlayer', editLinks: true, diff --git a/docs/README.md b/docs/README.md index 35fd088..6b08deb 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,9 +5,6 @@ actionLink: /guide/ footer: MIT Licensed | Made with love by DIYgod --- - - -