2016-08-01 46 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中進行過測試)。不過,「屬性」確實如此。該錯誤很難被注意 - 因爲它仍然「有效」,只是沒有全屏或無邊界視頻! –

相關問題