问题描述
在HTML5 Player中加载URL时遇到问题。
当我使用视频的物理路径(例如http://localhost/udemy/assets/images/videos/V20200724142619.mp4
)播放视频时,效果很好。
但是当我尝试使用类似的功能加载视频时
http://localhost/udemy/web/fetch_video/7
视频正在加载并且播放完美,但是搜索不起作用
我的php代码是
function fetch_video($video)
{
$modify=$this->data->get_modify_data('chapter','id',$video);
$file = $modify['video'];
$ext=explode('.',$file);
$type=$ext[count($ext)-1];
$file_size = filesize($file);
$file_pointer = fopen($file,"rb");
$data = fread($file_pointer,$file_size);
header("Content-type: video/$type");
echo $data;
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)