How can i Play wmv video in HTML player?

你离开我真会死。 提交于 2019-11-28 04:25:36

问题


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


回答1:


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

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.

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.




回答2:


For MP4

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

For 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



来源:https://stackoverflow.com/questions/23260092/how-can-i-play-wmv-video-in-html-player

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!