fix: fix video on iOS Safari (#1537)

* fix: fix video on iOS Safari

* add another missing type
This commit is contained in:
Nolan Lawson 2019-09-24 22:32:27 -07:00 committed by GitHub
parent 2c6a8468ea
commit 8fbf38e974
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -14,6 +14,7 @@
loop
webkit-playsinline
playsinline
type="*"
/>
</div>
<style>

View file

@ -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'}
<video
class="media-fit"
aria-label={description}
src={url}
type="*"
{poster}
controls
{intrinsicsize}
@ -14,6 +17,7 @@
class="audio-player"
aria-label={description}
src={url}
type="*"
controls
ref:player
/>
@ -23,6 +27,7 @@
class="media-fit"
aria-label={description}
src={url}
type="*"
{poster}
autoplay
muted