gpt4 book ai didi

video - 如何在榆树应用程序中嵌入视频

转载 作者:行者123 更新时间:2023-11-28 21:39:40 25 4
gpt4 key购买 nike

我在我的 elm 示例应用程序中嵌入了你的电子管视频。因此,为了实现,我编写了 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")
]
[]

关于video - 如何在榆树应用程序中嵌入视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38695651/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com