如何在 HTML 播放器中播放 wmv 视频?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23260092/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 01:37:17  来源:igfitidea点击:

How can i Play wmv video in HTML player?

htmlhtml5-videowmv

提问by user3480644

I want to Play wmvvideo in browser, and place header and footer in the page. I am unable to play mp4video, but i want to play wmv. I google it but unable to find anything. Kindly guide me ho to play wmvvideo from HTML page.

我想wmv在浏览器中播放视频,并在页面中放置页眉和页脚。我无法播放mp4视频,但我想播放wmv. 我谷歌它但无法找到任何东西。请指导我wmv从 HTML 页面播放视频。

回答by Arnaud Leyder

You cannot play WMV files in HTML5 video. This has been answered here.

您无法在 HTML5 视频中播放 WMV 文件。这已在此处得到解答。

If you want to play video cross browser with HTML5 video you have to transcode your WMV file (currently to MP4 and WebM). Have a look here for a take on HTML5 video.

如果您想使用 HTML5 视频跨浏览器播放视频,您必须对您的 WMV 文件(目前为 MP4 和 WebM)进行转码。在这里查看HTML5 视频

To embed WMV videos in a web page you have to use an object/embed tag that calls the windows media player plugin (if it is installed - ie it will not work in platforms where the plugin is not available like iOS). Have a look here for a working example.

要在网页中嵌入 WMV 视频,您必须使用调用 windows 媒体播放器插件的对象/嵌入标签(如果它已安装 - 即它不会在插件不可用的平台(如 iOS)中工作)。在这里查看一个工作示例

回答by blackhawk338

For MP4

MP4用

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
</video>

For WMV

对于 WMV

<video width="320" height="240" controls>
  <source src="movie.wmv" type="video/wmv">
</video>

Replace the movie.xxx part with the name or link/name of your movie You can place this anywhere on your page

将 movie.xxx 部分替换为电影的名称或链接/名称您可以将其放置在页面上的任何位置