如何在榆树应用程序中嵌入视频
how to embedded video in elm application
我在我的 elm 示例中嵌入了你的电子管视频 application.So 以实现我已经编写的 elm 视频代码
[ 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" ]
]
但我收到一些嵌入视频元素的错误
请任何人帮助我实现此功能。
您可以简单地将嵌入代码 (html) 翻译成 Elm 代码。
例如,如果是 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")
]
[]
我在我的 elm 示例中嵌入了你的电子管视频 application.So 以实现我已经编写的 elm 视频代码
[ 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" ]
]
但我收到一些嵌入视频元素的错误
请任何人帮助我实现此功能。
您可以简单地将嵌入代码 (html) 翻译成 Elm 代码。
例如,如果是 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")
]
[]