Jquery视频播放器如何使用url(http://)路径播放托管在服务器中的视频 [英] how jquery video player plays a video that hosted in server using url(http://) path

查看:118
本文介绍了Jquery视频播放器如何使用url(http://)路径播放托管在服务器中的视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi ..

我有一个视频网址(上传到服务器(或)video.mp4在服务器的文件夹内)。我想播放该视频使用jquery插件(如jquery lightbox)提供服务器路径( http://124.124.79.144/foldername/data/video.mp4 )。



我使用jquery灯箱,但在那里,我证明了url路径,这对于服务器路径url不起作用(但是当我提供youtube视频链接时它可以工作)。我不知道什么是happing ..是否有任何一个求助。



我也使用html5视频标签......它在服务器路径上不起作用。

解决方案

网址有效吗?例如,尝试直接在Chrome中打开它。作为替代方案,您可以尝试其他来源,例如: http://techslides.com/demos/sample-videos/ small.mp4 [ ^ ]

请注意,如果服务器尝试将视频文件作为附件或使用inproper mime类型传送,则可能会出现问题。对于IIS,您可以将其添加到 web.config (或以其他几种方式 [ ^ ]),如下所示:

 <   staticContent  >  
< 删除 fileExtension = 。mp4 < span class =code-keyword> / >
< mimeMap fileExtension = 。mp4 mimeType = video / mp4 / >
< span class =code-keyword>< remove fileExtension = .webm / >
< mimeMap fileExtension = .webm mimeType = video / webm / >
< / staticContent >





我建议使用此播放器来提供跨浏览器解决方案: http://www.videojs.com/ [ ^ ]


hi..
I have a video url (that uploaded in server (or) video.mp4 inside a folder in server ) .I want to play that video using jquery plugin (like jquery lightbox) by providing server path ( http://124.124.79.144/foldername/data/video.mp4).

I use jquery lightbox, but in that, I proved the url path, that does not work for server path url(but it works when I provide youtube video link) .I don't know whats happing.. Is any one for help.

Also I use html5 video tag...It does not work on server path .

解决方案

Is the url valid? Try to open it directly in Chrome for example. As an alternative, you can try other sources, like: http://techslides.com/demos/sample-videos/small.mp4[^]
Be aware, that there can be a problem, if the server is trying to deliver the video file as attachment or with inproper mime type. For IIS you can add it to the web.config (or in several other ways[^]), like this:

<staticContent>
      <remove fileExtension=".mp4" />
      <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
      <remove fileExtension=".webm" />
      <mimeMap fileExtension=".webm" mimeType="video/webm" />
</staticContent>



And I recommend using this player to have a cross-browser solution: http://www.videojs.com/[^]


这篇关于Jquery视频播放器如何使用url(http://)路径播放托管在服务器中的视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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