From da06effd2c28bf0088b859bf03da1183d9b0b730 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Fri, 22 May 2020 00:59:53 +0800 Subject: [PATCH] docs: fix docs component --- docs/.vuepress/components/DPlayer.vue | 4 ++-- docs/.vuepress/config.js | 9 ++++++++- docs/README.md | 3 --- docs/guide.md | 7 ------- docs/zh/README.md | 3 --- docs/zh/guide.md | 7 ------- 6 files changed, 10 insertions(+), 23 deletions(-) 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 --- - - -
diff --git a/docs/guide.md b/docs/guide.md index 8847db0..37a6968 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -4,13 +4,6 @@ sidebar: auto # Guide - - - - - - - # DPlayer 🍭 Wow, such a lovely HTML5 danmaku video player diff --git a/docs/zh/README.md b/docs/zh/README.md index 8b732c8..64b12fb 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -5,9 +5,6 @@ actionLink: /guide/ footer: MIT Licensed | Made with love by DIYgod --- - - -
diff --git a/docs/zh/guide.md b/docs/zh/guide.md index 156342e..6a45972 100644 --- a/docs/zh/guide.md +++ b/docs/zh/guide.md @@ -4,13 +4,6 @@ sidebar: auto # 指南 - - - - - - - # DPlayer 🍭 Wow, such a lovely HTML5 danmaku video player