Skip to content

Commit b769aef

Browse files
authored
Merge pull request #2 from caplod/muted
fix autoplay when video is not muted
2 parents 8ae943c + 9ef85f2 commit b769aef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

snippets/blocks/video-embed.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
$controls = $block->controls()->toBool() ? "controls" : "";
1010
$autoplay = $block->autoplay()->toBool() ? "autoplay" : "";
1111
$loop = $block->loop()->toBool() ? "loop" : "";
12+
$muted = $block->autoplay()->toBool() ? "muted" : "";
1213

1314
?>
1415

@@ -19,6 +20,7 @@
1920
<?= "$controls" ?>
2021
<?= "$autoplay" ?>
2122
<?= "$loop" ?>
23+
<?= "$muted" ?>
2224
alt="<?= $alt->esc() ?>">
2325
<source src="<?= \Kirby\Toolkit\Str::esc($file->url()) ?>" type="video/mp4">
2426
Your browser does not support the video tag.

0 commit comments

Comments
 (0)