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 loop
webkit-playsinline webkit-playsinline
playsinline playsinline
type="*"
/> />
</div> </div>
<style> <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'} {#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