2016-08-01 32 views
5

我嵌入你在我的榆树样品application.So管视频来实现我有写榆树视频编码在榆树应用程序如何嵌入视频

[ 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" ] 
] 

但我正在逐渐嵌入视频元素的某些错误

请任何人帮我推动这个功能。

回答

7

您可以简单地将嵌入代码(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") 
    ] 
    [] 
+0

感谢@Tosh您的帮助 –

+1

我浏览了该怎么办未给出值的属性,而“真正的”提示以上是非常有用的!但是,FWIW属性对我来说不适用于这些属性(仅在Chrome中进行过测试)。不过,“属性”确实如此。该错误很难被注意 - 因为它仍然“有效”,只是没有全屏或无边界视频! –

相关问题