在HTML5视频播放器中播放视频时遇到的问题 [英] Problem Facing in playing video in HTML5 video player

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

问题描述

实际上在我的asp.net网络表单中我在一个网站上使用HTML5视频播放器我看到一个例子我只是复制粘贴它正在工作但是当我从该链接下载该视频时我将该视频保存在我的驱动器中并给出src =它下面没有播放的路径是我的代码





以下代码正常工作



Actually in my asp.net web form i am using HTML5 video player in one site i seen a example i just copy pasted it is working but when i downloaded that video from that link i kept that video in my c drive and given src=path it is not playing here below is my code


Below code is working

<video id="video1" width="420">
    <source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4">
    Your browser does not support HTML5 video.
  </video>







以下代码无效






Below code is not working

<video id="video1" width="420">
    <source src="https://uat.priorusmed.com/PtImages/Sravi-klokesh/small.mp4" type="video/mp4">
    Your browser does not support HTML5 video.
  </video>







我的代码中有任何问题..




is there any problem in my code..

推荐答案

在这里,您只能使用绝对或相对URL。



可能值:



绝对网址 - 指向其他网页网站(如src =http://www.example.com/small.mp4)



相对网址 - 指向网站中的文件(如src =small.mp4)



当您将视频添加到您的网站时,您可以按如下方式使用它:

Here you can use either absolute or relative urls only.

Possible values:

An absolute URL - points to another web site (like src="http://www.example.com/small.mp4")

A relative URL - points to a file within a web site (like src="small.mp4")

When you add video into your web site,you can use it as below:
<video width='300' height='200' controls>
    <source src="/PtImages/Sravi-klokesh/Priorus-1394794109.mp4" type="video/mp4"/>
    <p>Fallback code if video isn't supported</p>/
    </video>


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

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