Compare commits

...

5 Commits

Author SHA1 Message Date
hunlongyu
588e52c330 😌 尝试v1 2020-06-01 17:00:58 +08:00
hunlongyu
6c4e110bb8 😫 再次尝试x86 2020-06-01 16:59:38 +08:00
hunlongyu
54857b8501 🥱 尝试x86 2020-06-01 16:52:39 +08:00
hunlongyu
a8a6fa2185 😶 白天写BUG, 晚上改BUG 2020-05-31 22:34:30 +08:00
hunlongyu
0e571efd6f 😑 日常写BUG, 改BUG 2020-05-31 13:40:34 +08:00
4 changed files with 98 additions and 50 deletions

35
.github/workflows/x86.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: release-build
on:
push:
tags:
- x86-v1
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: |
yarn
yarn dist
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: dist_electron
path: dist_electron
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -56,9 +56,9 @@
#### 下载:
1. [Github -- 官方下载](https://github.com/Hunlongyu/ZY-Player/releases)
1. [Github -- 官方下载(最新版)](https://github.com/Hunlongyu/ZY-Player/releases)
2. [蓝奏云 -- 快速下载](https://www.lanzous.com/b04s6a3re) 密码:95px
2. [蓝奏云 -- 快速下载(老版本)](https://www.lanzous.com/b04s6a3re) 密码:95px
#### 截图:
1. 浏览 ⇣ ↓

View File

@@ -1,6 +1,6 @@
{
"name": "zy",
"version": "1.0.14",
"version": "1.0.16",
"private": true,
"author": {
"name": "Hunlongyu",

View File

@@ -191,71 +191,81 @@ export default {
this.right.show = false
this.right.type = ''
},
'video.index' () {
this.getUrls()
video: {
handler () {
this.getUrls()
},
deep: true
}
},
methods: {
...mapMutations(['SET_VIEW', 'SET_DETAIL', 'SET_VIDEO', 'SET_SHARE']),
getUrls () {
this.name = ''
this.mask = true
if (this.timer !== null) {
clearInterval(this.timer)
this.timer = null
}
if (this.xg) {
this.xg.pause()
if (this.xg.hasStart) {
this.xg.pause()
}
}
this.changeVideo()
const index = this.video.index
let time = 0
history.find({ detail: this.video.detail }).then(item => {
let index = 0
let time = 0
if (item) {
index = item.index
if (this.video.index === index) {
if (item.index === index) {
time = item.currentTime
}
}
tools.detail_get(this.video.site, this.video.detail).then(res => {
this.name = this.video.name
this.right.listData = res.m3u8_urls
this.playVideo(index, time)
})
},
playVideo (index, time) {
tools.detail_get(this.video.site, this.video.detail).then(res => {
console.log(res, 'res paly video')
this.name = res.name
this.right.listData = res.m3u8_urls
const m = res.m3u8_urls
const arr = []
for (const i of m) {
arr.push(i.split('$')[1])
}
this.length = arr.length
this.xg.src = arr[index]
this.showNext = this.length > 1
const m = res.m3u8_urls
const arr = []
for (const i of m) {
arr.push(i.split('$')[1])
}
this.length = arr.length
console.log(index, 'play index')
this.xg.src = arr[index]
this.showNext = this.length > 1
const currentTime = time
if (currentTime !== 0) {
this.xg.play()
this.xg.once('playing', () => {
this.xg.currentTime = currentTime
})
} else {
this.xg.play()
if (time !== 0) {
this.xg.play()
this.xg.once('playing', () => {
this.xg.currentTime = time
})
} else {
this.xg.play()
}
this.xg.once('play', () => {
this.mask = false
})
this.onPlayVideo()
this.xg.once('ended', () => {
if (res.m3u8_urls.length > 1 && (res.m3u8_urls.length - 1 > this.video.index)) {
this.video.currentTime = 0
this.video.index++
}
this.xg.once('play', () => {
this.mask = false
})
this.onPlayVideo()
this.xg.once('ended', () => {
if (res.m3u8_urls.length > 1 && (res.m3u8_urls.length - 1 > this.video.index)) {
this.video.currentTime = 0
this.video.index++
}
this.xg.off('ended')
})
this.xg.off('ended')
})
})
},
changeVideo () {
this.checkStar()
this.checkTop()
this.name = ''
},
checkStar () {
video.find({ detail: this.video.detail }).then(res => {
@@ -274,6 +284,7 @@ export default {
},
onPlayVideo () {
this.more = true
this.changeVideo()
const h = { ...this.video }
history.find({ detail: h.detail }).then(res => {
if (res) {
@@ -312,24 +323,20 @@ export default {
this.right.type = ''
},
nextEvent () {
console.log(this.video.index, 'inex 1')
if (this.video.index < this.right.listData.length - 1) {
this.video.index++
this.video.currentTime = 0
} else {
this.$m.warning(this.$t('last_video'))
}
console.log(this.video.index, 'inex 2')
},
prevEvent () {
console.log(this.video.index, 'inex 3')
if (this.video.index > 0) {
this.video.index--
this.video.currentTime = 0
} else {
this.$m.warning(this.$t('first_video'))
}
console.log(this.video.index, 'inex 4')
},
listEvent () {
if (this.right.type === 'list') {
@@ -404,10 +411,16 @@ export default {
})
},
listItemEvent (n) {
this.video.currentTime = 0
this.video.index = n
this.right.show = false
this.right.type = ''
history.find({ detail: this.video.detail }).then(item => {
if (item) {
item.currentTime = 0
item.index = n
history.update(item.id, item)
}
this.video.index = n
this.right.show = false
this.right.type = ''
})
},
historyItemEvent (e) {
this.video = e