在HTML中播放FLV [英] play flv in html

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

问题描述

任何人都可以给我一个关于如何从我的html页面获得flv play的简明指令吗? 使用视频

.js非常容易。所有你需要做的是包括js& css in head&然后使用html5代码:

 < head> 
< link href =http://vjs.zencdn.net/c/video-js.css =stylesheet>
< script src =http://vjs.zencdn.net/c/video.js>< / script>
< / head>
< body>

详情请参阅 http://videojs.com/
其实,我没有找到有关播放flv文件的信息。但它工作正常。 :)



您可以使用其他视频格式,使用video.js,您需要更改的类型为...

 < source src =...type =video / mp4> 

此外,您的浏览器可能存在一些问题,您的浏览器是否支持.mp4格式,我可以不要在Chrome中播放.mp4,但在Firefox中可以正常工作。尝试使用不同格式的相同视频添加更多来源。喜欢......

 < source src =video1.mp4type =video / mp4> 
< source src =video1.oggtype =video / ogg>
< source src =video1.webmtype =video / webm>


Can anyone give a concise instruction on how I can have a flv play from my html page please?

解决方案

With video.js its very easy. All you need to do is include js & css in head & then use html5 code as:

<head>
    <link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet">
    <script src="http://vjs.zencdn.net/c/video.js"></script>
</head>
<body>
    <video id="video1" class="video-js vjs-default-skin" width="640" height="480"
        data-setup='{"controls" : true, "autoplay" : true, "preload" : "auto"}'>
        <source src="video1.flv" type="video/x-flv">
    </video>
</body>

For further details: http://videojs.com/ Actually, I did not find information specified about playing flv files. But it works fine. :)

You can use other video formats using video.js all you need to change is type as...

<source src="..." type="video/mp4">

Moreover, there might some issue regarding your browser, does your browser support the .mp4 format, I could not play .mp4 in chrome, but it works fine in firefox. Try adding more sources with same video in different formats. Like...

<source src="video1.mp4" type="video/mp4">
<source src="video1.ogg" type="video/ogg">
<source src="video1.webm" type="video/webm">

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

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