Fixed the issue of not being able to Airplay in some scenarios.
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user