Skip to content
A simple way of embedding a Youtube player using an Iframe in Elm.
Elm
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
example
src/Embed
.gitignore
LICENSE
README.md
elm.json

README.md

elm-embed-youtube

A wrapper around the Youtube IFrame Api

The IFrame player API lets you embed a YouTube video player on your website.

Goal

A simple way of embedding a Youtube player using an Iframe in Elm.

Usage example

Embed.Youtube.fromString "kBZsyksIgNE"
    |> Embed.Youtube.attributes
        [ Embed.Youtube.Attributes.width 640
        , Embed.Youtube.Attributes.height 400
        ]
    |> Embed.Youtube.toHtml

Embed.Youtube.fromString "kBZsyksIgNE"
    |> Embed.Youtube.attributes
        [ Embed.Youtube.Attributes.width 640
        , Embed.Youtube.Attributes.height 400
        , Embed.Youtube.Attributes.autoplay
        , Embed.Youtube.Attributes.language "nl"
        , Embed.Youtube.Attributes.modestBranding
        , Embed.Youtube.Attributes.disableFullscreen
        , Embed.Youtube.Attributes.disableKeyboard
        ]
    |> Embed.Youtube.toHtml
You can’t perform that action at this time.