Fixed the issue of not being able to Airplay in some scenarios.

This commit is contained in:
iAladdin
2020-08-21 17:29:00 +08:00
parent 2581f56502
commit 93890fb94e
5 changed files with 13 additions and 4 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -22,7 +22,7 @@ class Template {
current: true,
pic: this.options.video.pic,
screenshot: this.options.screenshot,
airplay: this.options.airplay,
airplay: utils.isSafari ? this.options.airplay : false,
preload: this.options.preload,
url: this.options.video.url,
subtitle: this.options.subtitle,
+2
View File
@@ -93,6 +93,8 @@ const utils = {
isChrome: /chrome/i.test(window.navigator.userAgent),
isSafari: /safari/i.test(window.navigator.userAgent),
storage: {
set: (key, value) => {
localStorage.setItem(key, value);
+8 -1
View File
@@ -7,8 +7,15 @@
{{ if pic }}poster="{{ pic }}"{{ /if }}
{{ if screenshot || enableSubtitle }}crossorigin="anonymous"{{ /if }}
{{ if preload }}preload="{{ preload }}"{{ /if }}
{{ if url }}src="{{ url }}"{{ /if }}
{{ if airplay }}
nosrc
{{ else if url }}
src="{{ url }}"
{{ /if }}
>
{{ if airplay }}
<source src="{{ url }}">
{{ /if}}
{{ if enableSubtitle }}
<track kind="metadata" default src="{{ subtitle.url }}"></track>
{{ /if }}