duanrui3480 2014-07-05 03:23
浏览 63
已采纳

如何在codeigniter中使用媒体播放器显示视频

How can I add media player in codeigniter,

I use below code, but still can't show the video :

<video width="205" height="180" controls>
  <source src="application/views/web/videostreaming/video2.mp4" type="video/mp4" />
  <source src="application/views/web/videostreaming/video2.ogv" type="video/ogg" />
  <source src="application/views/web/videostreaming/video2.flv" type="video/flv" />
</video>

I added video sources in application/config/mimes.php like this:

            'mp4'   =>  'video/mp4',
            'flv'   =>  'video/flv',
            'ogv'   =>  'video/ogv',

output error is:

No video with supported format and MIME type found

please help me to resolve this problem, thank you

  • 写回答

2条回答 默认 最新

  • doubiao7267 2014-07-05 03:33
    关注

    Your error No video with supported format and MIME type found is a client-side issue, meaning that the browser cannot play any of your provided video files. Changing the CodeIgniter mime types isn't going to help you (unless perhaps you are processing all requests including those for static files through PHP). Check that your MP4 file is using H.264/AAC codices, and you OGV file is the Theora/Vorbis codicies and that these file paths are correct (you may want to dynamically create absolute paths using CodeIgniter's base_url() function).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办