是否有可能在asp.net中的HTMl5视频控制中播放所有类型的视频格式 [英] Is there any possibility to play all type of video formats in HTMl5 video control in asp.net

查看:67
本文介绍了是否有可能在asp.net中的HTMl5视频控制中播放所有类型的视频格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

其实我在asp.net中使用HTML5视频控制来播放视频..到目前为止它在这方面运作良好问题是它只播放.mp4格式只有在HTM5中播放更多格式的可能性



以下是我的代码..



 <   video     id   = 视频    runat   =  server    width   ='  300'    height   ='   200'   控件 >  
< source src = <% #Eval( PostImageUrl)。ToString()% > type = video / mp4 / > ;
< p > 如果不支持视频,则返回代码< / p > /
< / video >





我的确切问题就像下面链接一样,之前在stackoverflow中询问过



http://stackoverflow.com/questions / 15450965 / video-not-playing-in-browsers [ ^ ]

解决方案

并非所有格式。 HTML5视频标签 - 根据规范 - 应支持MPEG.4,OGG,WEBM(VP8和VP9)和H.264。但是浏览器的实际支持可能会有所不同......(例如Chrome不支持MPEG.4)。

https://developer.mozilla.org/en-US/docs/HTML/Supported_media_formats [ ^ ]


http://en.wikipedia.org/wiki/Use_of_Ogg_formats_in_HTML5 [ ^ ]



http:/ /en.wikipedia.org/wiki/HTML5_video [ ^

Actually i am using HTML5 video control in asp.net to play videos..up to now it is working good here problem is it is playing only .mp4 format only is there any possibility to play more number of formats in HTM5

Below is my code..

<video id="Video" runat="server" width='300' height='200' controls>
                                                        <source src="<%# Eval("PostImageUrl").ToString() %>" type="video/mp4"/>
                                                        <p>Fallback code if video isn't supported</p>/
                                                        </video>



And my exact question is like below link some one asked before in stackoverflow

http://stackoverflow.com/questions/15450965/videos-not-playing-in-browsers[^]

解决方案

Not all formats. HTML5 video tag - according to specification - should support MPEG.4, OGG, WEBM (VP8,and VP9) and H.264. However real life support of browsers can be different...(for instance Chrome does not support MPEG.4).
https://developer.mozilla.org/en-US/docs/HTML/Supported_media_formats[^]


http://en.wikipedia.org/wiki/Use_of_Ogg_formats_in_HTML5[^]

http://en.wikipedia.org/wiki/HTML5_video[^]


这篇关于是否有可能在asp.net中的HTMl5视频控制中播放所有类型的视频格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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