如何在任何浏览器中播放任何类型的视频 [英] how to play video of any type in any browser

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

问题描述

我想播放任何类型的视频,并在任何浏览器中播放该视频
我已经为此代码编写了

i want to play a video of any type and in any broswer how to do this
i have written code for this as

<video width="320" height="240" controls="controls"> 
   <source src=""="Video/MySampleVideo.ogg" type="video/ogg" />  
   <source src="Video/MySampleVideo.mp4" type="video/mp4" /> 
   <source src="Video/MySampleVideo.webm" type="video/webm" />   
   <source src="Video/MySampleVideo.avi" type="video/avi" />     
   <source src="Video/MySampleVideo.flv" type="video/flv" />
   <object width="320" height="240" src="Video/MySampleVideo.mp4">
      <embed width="320" height="240" src="Video/MySampleVideo.flv">
         Your browser does not support video
      </embed>
   </object>
</video>



但它不起作用,请帮助
我没有使用html5.是否要尝试以html5格式播放视频?



but it is not working ,Please help
I am not using html 5. Is there any other code

推荐答案

是否还有其他代码?请考虑并非所有浏览器都支持此功能,也不是所有浏览器都支持所有格式.

看到此链接:
HTML5视频

--------------
问候

H.Maadani
you are trying to play video in html5 format. consider that not all browsers support this, and not all browsers support all formats.

see this link :
HTML5 Video

--------------
Regards

H.Maadani


video标记是在HTML5中引入的.因此,它将仅在支持HTML5的浏览器中显示.

对于其他浏览器,您可以使用Flash视频.但这需要用户安装Flash Player.实施起来很棘手. (老实说,我不知道如何使用Flash播放音频/视频,我只是知道可以做到.)
The video tag was introduced in HTML5. So it will only be displayed in HTML5 supported browsers.

For other browsers, you can use flash videos. But this requires users to install the flash player. And that is tricky to implement. (Honestly I do not know how to play audio/video using flash, I just know it can be done.)


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

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