A simple way of embedding a Youtube player using an Iframe in Elm.
view : Model -> Html.Html Msg
view _ =
let
youtube =
fromString "kBZsyksIgNE"
in
Html.div []
[ Html.h2 [] [ Html.text "Thumbnail" ]
, Html.img
[ toUrl HighQuality youtube
|> Url.toString
|> Html.Attributes.src
]
[]
, Html.h2 [] [ Html.text "Embed" ]
, toHtml <|
attributes
[ width 530
, height 300
, language "en"
, playsInline
]
youtube
]