如何在HTML中播放视频 [英] How to video Play in HTML

查看:105
本文介绍了如何在HTML中播放视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生,



我试试下面的代码不播放视频,以便如何在html中播放视频(谷歌浏览器,IE浏览器,Mozila Fire Fox)



Dear Sir,

I am try this below code Not Play video so how to play video in html(google chrome,IE,Mozila Fire Fox)

<!DOCTYPE html>
 <html> 
<head>
 <title>HTML Video Tag Example</title>
 </head> 
<body> 
<video width="320" height="240" controls="controls" autoplay="autoplay">
 <source src="D:\DONOTDELETE\HIMT_2Min_Final.mp4" type="video/mp4"> <object data="" width="320" height="240"> 
<embed width="320" height="240" src="D:\DONOTDELETE\HIMT_2Min_Final.mp4"> </object> </video>
 </body> 
</html>

推荐答案

我认为您的问题与文件路径有关。我刚刚使用 w3c examaple 中给出的网址更改了网址[ ^ ],检查了您的代码 - 它运作良好。

请检查视频的文件路径。而且您不必使用< object>< / object> & < embed>< / embed> < video>< / video> 内,仅< source>< / source> 可以帮你完成工作。



-KR
I think your issue is related to the file path. I just changed the url with the url given in w3c examaple[^], checked your code - and it worked.
So check the file path of the video. And you don't have to use <object></object> & <embed></embed> within the <video></video>, only <source></source> would do the job for you.

-KR


Quote:

我认为您的问题与文件路径有关。我刚刚使用 中提供的网址更改了网址,检查了您的代码 - 它确实有效。



I think your issue is related to the file path. I just changed the url with the url given in for example checked your code - and it worked.



这篇关于如何在HTML中播放视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆