解决办法:
需要nginx反向代理解析来解决该问题
nginx下载地址:http://nginx.org/en/download.html
nginx: nginx.conf 配置文件修改如下:
server {
listen 7788;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
}
location ~ .*\.(mp4)$
{
root D:\apache-tomcat-7.0.88\webapps;
expires 7d;
}
}
最后使用HTML5 video 调用地址
<video id='my-video' poster="img.jpg" controls="controls" width='100%' height='100%'>
<source src="http://192.168.0.4:7788/userfiles/123.mp4" type='video/mp4' webkit-playsinline=”true” playsinline=”true” x5-playsinline=”true” x-webkit-airplay=”allow” controls=”“>
<p style="color: #FF0000">您的浏览器不支持该视频功能!.</p>
</video>
完美解决视频播放