在没有控件的情况下在网站上嵌入视频

发布于 2024-10-27 14:17:09 字数 197 浏览 2 评论 0原文


我正在尝试在网站上嵌入视频以用作介绍。我对一种在没有控制栏的情况下嵌入视频的方式感兴趣(播放、暂停...)。我可以将其转换为任何格式,因为我有项目文件,所以兼容性不是问题。我尝试过在 HTML5 中使用标签插入它,并且可以无缝工作,但是由于 Chrome 中的一个错误,视频中的白色变成灰色,这对我不起作用,因为视频背景必须是白色的,这样它就可以与其余部分一起伪装网站。

I am trying to embed a video on a website which will be used as an intro. Im interested in a way of embeding that video without a control bar (play,pause...). I can convert it to any format as I have the project file so compability isnt an issue. I have tried inserting it with tag in HTML5 and that works seamlessly but because of a bug in Chrome white color in the video becomes gray and that doesnt work for me because video background has to be white so it can be camouflaged with the rest of the website.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

姐不稀罕 2024-11-03 14:17:09

有趣的。我还没有看到 Chrome/white 问题,但从它的声音来看......它只是在 Chrome 的开发版本中?我基于这篇文章。

似乎有一个补丁,正在等待 要合并

不确定这些是否有助于使用 HTML5 的视频标签。如果您不关心标签,您始终可以选择使用 .mp4 文件的基于 Flash 的版本。这样,只要您对 Chrome 的渲染感到满意...您就可以使用视频标签将其重新设置。

再说一遍,如果您可以使用 Flash...您可以像这样完成它(使用 Flowplayer):

<object width="600" height="338" type="application/x-shockwave-flash" data="http://whywouldyouclickthat.com/flowplayer/flowplayer-3.2.7.swf">
    <param name="movie" value="http://whywouldyouclickthat.com/flowplayer/flowplayer-3.2.7.swf" />
    <param name="allowfullscreen" value="true" />
    <param name="flashvars" value='config={"clip": {"url": "/yourDirectory/yourMovie.mp4", "autoPlay":true, "autoBuffering":true},"plugins": {"controls": null}}' />
</object>

再次强调,不确定 Flash 是否会破坏这里的交易。

Interesting. I haven't seen the Chrome/white issue, but from the sounds of it... it's just in dev versions of Chrome? I'm basing this off the last comment from this post.

Looks like there was a patch, and it's waiting to be merged.

Not sure if these help in terms of using HTML5's video tag. If you don't care about the tag, you could always go with a Flash-based version using an .mp4 file. That way, whenever you're comfortable with Chrome's rendering... you could set it back up with the video tag.

Again, if you're ok with using Flash... you could pull it off like so (using Flowplayer):

<object width="600" height="338" type="application/x-shockwave-flash" data="http://whywouldyouclickthat.com/flowplayer/flowplayer-3.2.7.swf">
    <param name="movie" value="http://whywouldyouclickthat.com/flowplayer/flowplayer-3.2.7.swf" />
    <param name="allowfullscreen" value="true" />
    <param name="flashvars" value='config={"clip": {"url": "/yourDirectory/yourMovie.mp4", "autoPlay":true, "autoBuffering":true},"plugins": {"controls": null}}' />
</object>

Again, not sure if Flash is a deal-breaker here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文