fix: fix video on iOS Safari (#1537)
* fix: fix video on iOS Safari * add another missing type
This commit is contained in:
parent
2c6a8468ea
commit
8fbf38e974
|
@ -14,6 +14,7 @@
|
||||||
loop
|
loop
|
||||||
webkit-playsinline
|
webkit-playsinline
|
||||||
playsinline
|
playsinline
|
||||||
|
type="*"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -1,8 +1,11 @@
|
||||||
|
<!-- iOS safari requires type="*" on video to play properly, don't ask me why
|
||||||
|
https://stackoverflow.com/a/28361053 -->
|
||||||
{#if type === 'video'}
|
{#if type === 'video'}
|
||||||
<video
|
<video
|
||||||
class="media-fit"
|
class="media-fit"
|
||||||
aria-label={description}
|
aria-label={description}
|
||||||
src={url}
|
src={url}
|
||||||
|
type="*"
|
||||||
{poster}
|
{poster}
|
||||||
controls
|
controls
|
||||||
{intrinsicsize}
|
{intrinsicsize}
|
||||||
|
@ -14,6 +17,7 @@
|
||||||
class="audio-player"
|
class="audio-player"
|
||||||
aria-label={description}
|
aria-label={description}
|
||||||
src={url}
|
src={url}
|
||||||
|
type="*"
|
||||||
controls
|
controls
|
||||||
ref:player
|
ref:player
|
||||||
/>
|
/>
|
||||||
|
@ -23,6 +27,7 @@
|
||||||
class="media-fit"
|
class="media-fit"
|
||||||
aria-label={description}
|
aria-label={description}
|
||||||
src={url}
|
src={url}
|
||||||
|
type="*"
|
||||||
{poster}
|
{poster}
|
||||||
autoplay
|
autoplay
|
||||||
muted
|
muted
|
||||||
|
|
Loading…
Reference in a new issue