for iOS devices fallback directly to m3u8
This commit is contained in:
parent
1fa4c523bb
commit
e847fea2dd
1 changed files with 4 additions and 3 deletions
|
|
@ -52,6 +52,7 @@ const thumbnail = ref('')
|
|||
const artist = ref('')
|
||||
const title = ref('')
|
||||
const isAudio = ref(false)
|
||||
const isApple = /(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent)
|
||||
|
||||
let player = null;
|
||||
let hls = null;
|
||||
|
|
@ -70,8 +71,8 @@ onMounted(async () => {
|
|||
}
|
||||
|
||||
sources.value.push({
|
||||
src: makeDownload(config, props.item, 'api/download'),
|
||||
type: response.mimetype,
|
||||
src: makeDownload(config, props.item, isApple ? 'm3u8' : 'api/download'),
|
||||
type: isApple ? response.mimetype : 'application/x-mpegURL',
|
||||
onerror: e => src_error(e),
|
||||
})
|
||||
|
||||
|
|
@ -100,7 +101,7 @@ onMounted(async () => {
|
|||
})
|
||||
})
|
||||
|
||||
if (/(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent)) {
|
||||
if (isApple) {
|
||||
document.documentElement.style.setProperty('--webkit-text-track-display', 'block');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue