I am embedding you tube videos in my elm sample application.So to implement i have write the elm video code
[ embed [ attribute "-video" "", attribute "api" "1", attribute "height" "100%", href "//vimeo.com/111690998", attribute "iframe-id" "vimeo1", attribute "player_id" "vimeo1", attribute "width" "100%" ]
[]
, a [ href "//vimeo.com/111690998" ]
[ text "Watch" ]
]
but i am getting some error of embed-video element
Please any one help me to impelment this feature.
To embed a video in an HTML page, use the <iframe> element. The source attribute included the video URL. For the dimensions of the video player, set the width and height of the video appropriately. The Video URL is the video embed link.
An embed code is essentially a little bit of a computer code which starts the video player and showcases it with regards to your website page. However, embed codes are not always so straightforward and simple. When it comes to professional and expert video hosting services, the embed codes tend to be much longer.
You can simply translate embed code (html) into Elm code.
For example, in case of youtube...
import Html exposing (..)
import Html.Attributes exposing (..)
import Json.Encode
videoframe =
iframe
[ width 560
, height 315
, src "https://www.youtube.com/embed/test"
, property "frameborder" (Json.Encode.string "0")
, property "allowfullscreen" (Json.Encode.string "true")
]
[]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With