[feature] Next episode button #4
@ -89,6 +89,7 @@ onBeforeUnmount(() => {
|
||||
|
||||
watch([instance, () => props.urls], async ([artplayer, urls]) => {
|
||||
if (!artplayer) return;
|
||||
urls = urls.reverse()
|
||||
artplayer.quality = urls;
|
||||
artplayer.switch = urls[0].url;
|
||||
instance.value = artplayer;
|
||||
|
@ -55,11 +55,13 @@ watchEffect(async () => {
|
||||
results.value = response?.data || null
|
||||
|
||||
if (results.value?.links) {
|
||||
hlsUrls.value = Object.entries(results.value.links).map(([quality, links], index) => {
|
||||
console.log(results.value.links)
|
||||
hlsUrls.value = Object.entries(results.value.links).map(([quality, links], index, arr) => {
|
||||
const isLatest = index === arr.length - 1
|
||||
return {
|
||||
html: quality,
|
||||
url: links.find(link => link.src?.includes('.m3u8') || link.type?.includes('hls'))?.src,
|
||||
default: index === 0
|
||||
default: isLatest
|
||||
}
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user