如何将视频放置在 ASP.NET 页面上并使其及时加载?

发布于 2024-09-24 20:18:44 字数 905 浏览 2 评论 0原文

我有一个 .avi 视频(500 MB-50 分钟),我在 VB.NET 中使用以下代码嵌入该视频:

<OBJECT width="360px" height="360px" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" VIEWASTEXT>
<PARAM name="autoStart" value="False">
<PARAM name="URL" value="Video\Wellness_1.wmv">
<PARAM name="enabled" value="True">
<PARAM name="balance" value="0">
<PARAM name="currentPosition" value="0">
<PARAM name="enableContextMenu" value="True">
<PARAM name="fullScreen" value="false">
<PARAM name="mute" value="False">
<PARAM name="playCount" value="1">
<PARAM name="rate" value="1">
<PARAM name="stretchToFit" value="False">
<PARAM name="uiMode" value="full">
</OBJECT>

工作正常,只是加载时间大约为 5 分钟。将其转换为 wmv 文件(将其缩小到 300 MB),下载时立即开始播放。不幸的是,有些计算机由于某种原因无法播放它。它将加载并且计时器启动,就像视频正在播放一样,但只是黑屏。 我进行了一些测试并确定这不是浏览器问题。

如何上传可在所有计算机上立即播放的视频?

I have an .avi video (500 MB-50 minutes) that I embedded using the following code in VB.NET:

<OBJECT width="360px" height="360px" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" VIEWASTEXT>
<PARAM name="autoStart" value="False">
<PARAM name="URL" value="Video\Wellness_1.wmv">
<PARAM name="enabled" value="True">
<PARAM name="balance" value="0">
<PARAM name="currentPosition" value="0">
<PARAM name="enableContextMenu" value="True">
<PARAM name="fullScreen" value="false">
<PARAM name="mute" value="False">
<PARAM name="playCount" value="1">
<PARAM name="rate" value="1">
<PARAM name="stretchToFit" value="False">
<PARAM name="uiMode" value="full">
</OBJECT>

Worked fine except that it took approx 5 minutes to load. Converted it to a wmv file (cutting it down to 300 MB) and it started playing instantly while it download. Unfortunately there are some computers that will not play it for some reason. It will load and the timer starts up as if the video is playing but there is just a black screen.
I ran some tests and determined that it's not a browser issue.

How can I upload a video that instantly plays on all computers?

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

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

发布评论

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

评论(1

花开雨落又逢春i 2024-10-01 20:18:44

显然,视频至少需要缓冲一部分才能播放,因此要求“在所有计算机上立即播放的视频”是没有意义的。

不幸的是,有些计算机由于某种原因无法播放它。

这些“一些计算机”是什么?他们可能没有能够播放 WMV 文件的插件。如果您想覆盖尽可能广泛的受众,目前 Flash 是您最好的选择。 Internet 上有大量 FLV 转换器,您可以使用它们将 AVI 视频转换为 FLV。

HTML5 视频是另一种选择,但并非所有浏览器(特别是 IE)都支持它。

Obviously at least some part of the video needs to be buffered before it can be played, so it makes no sense to ask for "a video that instantly plays on all computers".

Unfortunately there are some computers that will not play it for some reason.

What are these "some computers"? They probably don't have a plug-in that is capable of playing WMV files. If you want to reach as wide an audience as possible, at the moment, Flash is your best bet. There are plenty of FLV converters available on the Internet that you can use to convert your AVI video into FLV.

HTML5 video is another option but not all browsers (specifically IE) support it yet.

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