Skip to content

Commit

Permalink
add playsinline and muted to videos for autoplay on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
fredhohman committed Aug 14, 2020
1 parent dcb2956 commit d6fe3c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/diagrams/example-table.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
@media(max-width: 1000px) {
th { font-size: 1em !important }
td, tr {
font-size: 0.85em !important;
line-height: 1.35em;
Expand Down
4 changes: 2 additions & 2 deletions src/diagrams/video-example.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@
<div class="overlay" bind:this={overlay}></div> -->

{#if shortVideo === true}
<video class="paused" bind:this={video} muted="muted" autoplay="true" controls loop>
<video class="paused" bind:this={video} autoplay controls playsinline muted loop>
<source src={example.teaser} type="video/mp4">
Your browser does not support HTML5 video.
</video>
{:else if shortVideo === false}
<video class="paused" bind:this={video} muted="muted"autoplay="true" controls>
<video class="paused" bind:this={video} autoplay controls playsinline muted>
<source src={example.video} type="video/mp4">
Your browser does not support HTML5 video.
</video>
Expand Down

0 comments on commit d6fe3c8

Please sign in to comment.