diff --git a/src/components/Play.vue b/src/components/Play.vue index de3121d..037eaeb 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -326,57 +326,6 @@ export default { this.xg.off('ended') }) }) - // const id = this.video.info.id - // zy.detail(this.video.key, id).then(res => { - // this.name = res.name - // const dd = res.dl.dd - // const type = Object.prototype.toString.call(dd) - // let m3u8Txt = [] - // if (type === '[object Array]') { - // for (const i of dd) { - // if (i._t.indexOf('m3u8') >= 0) { - // m3u8Txt = i._t.split('#') - // } - // } - // } else { - // m3u8Txt = dd._t.split('#') - // } - // this.right.list = m3u8Txt - // const m3u8Arr = [] - // for (const i of m3u8Txt) { - // const j = i.split('$') - // if (j.length > 1) { - // for (let m = 0; m < j.length; m++) { - // if (j[m].indexOf('m3u8') >= 0) { - // m3u8Arr.push(j[m]) - // } - // } - // } else { - // m3u8Arr.push(j[0]) - // } - // } - - // this.xg.src = m3u8Arr[index] - // this.showNext = m3u8Arr.length > 1 - - // if (time !== 0) { - // this.xg.play() - // this.xg.once('playing', () => { - // this.xg.currentTime = time - // }) - // } else { - // this.xg.play() - // } - - // this.videoPlaying() - // this.xg.once('ended', () => { - // if (m3u8Arr.length > 1 && (m3u8Arr.length - 1 > index)) { - // this.video.info.time = 0 - // this.video.info.index++ - // } - // this.xg.off('ended') - // }) - // }) }, fetchM3u8List () { return new Promise((resolve) => { @@ -387,7 +336,6 @@ export default { return } zy.detail(this.video.key, this.video.info.id).then(res => { - window.console.log(res) this.name = res.name const dd = res.dl.dd const type = Object.prototype.toString.call(dd) @@ -585,7 +533,6 @@ export default { playerState: this.xg.readyState || '', networkState: this.xg.networkState || '' } - console.log(info) clipboard.writeText(JSON.stringify(info, null, 4)) this.$message.success('视频信息复制成功') }, @@ -628,15 +575,9 @@ export default { link: link }) } - - console.log(m3u8Arr) - - let m3u8Content = `#EXTM3U -` + let m3u8Content = `#EXTM3U` for (const item of m3u8Arr) { - m3u8Content += `#EXTINF:-1, ${item.name} -${item.link} -` + m3u8Content += `#EXTINF:-1, ${item.name}${item.link}` } const blob = new Blob([m3u8Content], { type: 'application/vnd.apple.mpegurl' }) const downloadElement = document.createElement('a') // 创建下载的链接 @@ -965,7 +906,6 @@ ${item.link} this.mtEvent() }, mounted () { - console.log(this) Player.install('playPrev', function () { addPlayerBtn.bind(this, 'playPrev', '', { title: '上一集' })() }) @@ -991,10 +931,6 @@ ${item.link} this.xg = new Hls(this.config) ipcRenderer.on('miniClosed', () => { - // this.xg.destroy() - // this.xg = new Hls(this.config) - // this.bindEvent() - // 同步进度 history.find({ site: this.video.key, ids: this.video.info.id }).then(res => { if (res) { if (this.video.info.index !== res.index) {