全屏背景视频?

发布于 2024-09-07 22:19:16 字数 593 浏览 1 评论 0 原文

类似于这个问题(不过,那个人不想使用Flash,而我' d 没问题):

是否有一种可靠的、适用于大多数浏览器的方法可以在 HTML 页面中拥有全区域视频背景,视频开始自动播放并无限循环,并且能够将 HTML 元素透明地放在其上?

我可以使用 Flash 视频播放器。

“大多数浏览器”的意思是,对IE 6的支持将是完美的,但如果不能做到,那就不能做到。不过,IE7 是必须的,所有现代浏览器 Firefox 2.x 和 3.x 以及 Webkit 系列也是必须的。不过,请不要犹豫,也发布范围更有限的解决方案。

理想情况下,它会自动拉伸到 100% 文档宽度并相应地调整视频大小。

我对使用哪种视频格式持开放态度,尽管 H.264 是完美的。

同样理想的是,这可以通过开箱即用的简约播放器组件来完成(即不需要我有 Flash 来编译电影)。一个简单的音量控制/静音按钮会很好,但不是强制性的。

与我链接到的问题不同,等待 HTML 5 不是一个选择。

Similar to this question (that one doesn't want to use Flash, though, while I'd be fine with it):

Is there a reliable, works-in-most-browsers way to have a full-area Video background in an HTML page, the Video starting to play automatically and looping endlessly, and being able to put HTML elements on top of it transparently?

I'm fine with using a Flash video player.

"Most browsers" means, support for IE 6 would be perfect, but if it can't be done it can't be done. IE7 is a must, though, as are all the modern browsers Firefox 2.x and 3.x, and the Webkit family. Don't hesitate to also post solutions that have a more limited scope, though.

Ideally, it would automatically stretch to 100% document width anmd resize the video accordingly.

I'm open about which video format to use, although H.264 would be perfect.

Also ideally, this could be done with a minimalistic player component that works out of the box (i.e. doesn't require me having Flash to compile a movie). A simple volume control / mute button would be nice but is not mandatory.

Unlike in the question I linked to, waiting for HTML 5 is not an option.

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

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

发布评论

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

评论(1

雨落星ぅ辰 2024-09-14 22:19:16

这不是什么大问题。基本上,您必须在嵌入 SWF 时设置正确的wmode,浏览器能够在 FlashPlayer 之上呈现。我不是这方面的专家,所以要么其他人可以告诉你,要么你必须尝试一下。据我所知,这会对性能产生相当大的影响。

视频格式根本不重要,只要它是 FLV 编解码器

所以基本上回答你的问题:是的,这可以使用闪光灯来完成,而且非常简单。您可以找到适合您需求的播放组件,也可以使用 flash.media::Video。使用 flash。 external::ExternalInterface 您还可以创建一个接口,以便您可以在 JavaScript 中实现您想要的任何控件。

问候
后退2dos

This is not so much of a problem. Basically, you have to set the right wmode when embedding the SWF, for the browser to be able to render above the FlashPlayer. I'm not a pro on that, so either someone else can tell you, or you'll have to try. As far as I know, this can have quite a hit on performance though.

The video format doesn't matter at all, as long as it's an FLV-codec.

So to basically answer your question: yes, this can be done using flash and it is quite straight forward. You can either find a playback component, that suits your needs, or start from scratch using flash.media::Video. Using flash.external::ExternalInterface you could also create an interface, so that you can implement any controls you want in JavaScript.

greetz
back2dos

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