From c20bbb6d05939567fdea60689ee0d43b28cf6923 Mon Sep 17 00:00:00 2001 From: Brock <58987761+13r0ck@users.noreply.github.com> Date: Mon, 12 Apr 2021 17:14:44 -0600 Subject: [PATCH 1/2] Add the `muted` Attribute Because Chrome requires the `muted` attribute to autoplay video (even if the video doesn't have audio) It is a nice convenience to have this. --- src/Html/Attributes.elm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Html/Attributes.elm b/src/Html/Attributes.elm index 652fc62..36e0862 100644 --- a/src/Html/Attributes.elm +++ b/src/Html/Attributes.elm @@ -11,7 +11,7 @@ module Html.Attributes exposing , ismap, usemap, shape, coords , src, height, width, alt , autoplay, controls, loop, preload, poster, default, kind, srclang - , sandbox, srcdoc + , sandbox, srcdoc, muted , reversed, start , align, colspan, rowspan, headers, scope , accesskey, contenteditable, contextmenu, dir, draggable, dropzone @@ -358,6 +358,12 @@ loop : Bool -> Attribute msg loop = boolProperty "loop" +{-| Indicates whether the browser should play the video muted. Required for `sutoplay` +in some modern web browsers +-} +muted : Bool -> Attribute msg +muted = + boolProperty "muted" {-| Control how much of an `audio` or `video` resource should be preloaded. -} preload : String -> Attribute msg From 984333323e35f96b38f78301603c88d152259de5 Mon Sep 17 00:00:00 2001 From: Brock <58987761+13r0ck@users.noreply.github.com> Date: Tue, 13 Apr 2021 11:47:26 -0600 Subject: [PATCH 2/2] Update src/Html/Attributes.elm Ooops! Thanks haha Co-authored-by: Martin Janiczek --- src/Html/Attributes.elm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Html/Attributes.elm b/src/Html/Attributes.elm index 36e0862..41f570f 100644 --- a/src/Html/Attributes.elm +++ b/src/Html/Attributes.elm @@ -358,7 +358,7 @@ loop : Bool -> Attribute msg loop = boolProperty "loop" -{-| Indicates whether the browser should play the video muted. Required for `sutoplay` +{-| Indicates whether the browser should play the video muted. Required for `autoplay` in some modern web browsers -} muted : Bool -> Attribute msg