-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
视频播放功能改进请求 #209
Comments
啊,我的头发 |
补充一下,除了mp4,其他的视频格式有些有跨域问题,比如flv啊,因为微软下载服务器简单请求有防跨域设置,但是用dplayer播放flv的视频会产生preflight请求,而微软没有针对这个设置防跨域,结合我用oneindex的经验,要实现flv视频的播放需要自行反代实现,在反代服务器上添加完善防跨域设置,而onemanager的改动就交给大佬的头发了,大佬有空就做,没空就算了,过度方案是使用者所有视频都转成mp4上传(mkv好像也可以),笑 |
🍄加油 |
请问为什么播放flv文件时,dplayer.js下载播放开头的一个片段就没问题,之后就会被浏览器由于CSRF拦截呢?您认为这个除了设置反代以外,还能有其他解决方案吗? |
大佬加油,视频格式支持全一点是真的需要,谢谢大佬及大佬的头发! |
下面功能实现个人版不行
希望添加'avi', 'mpg', 'mpeg', 'rm', 'rmvb', 'mov', 'wmv', 'asf', 'ts'的在线播放支持,
mp4等格式处理不变,上面几个单独处理,
扒了一下oneindex,可以使用dash实现,
下面代码仅作举例说明
1.获取文件缩略图链接
2.将缩略图链接替换部分
$videourl = str_replace("thumbnail", "videomanifest", $item['thumb']) . "&part=index&format=dash&useScf=True&pretranscode=0&transcodeahead=0";
3.用dplayer播放,添加类型参数为dash
const dp = new DPlayer({ container: document.getElementById('dplayer'), lang:'zh-cn', video: { url: '<?php echo $videourl; ?>', type: 'dash' } });
另外,dplayer有个封面也可以搞下
const dp = new DPlayer({ container: document.getElementById('dplayer'), lang:'zh-cn', video: { url: '<?php echo $videourl; ?>', pic: '文件缩略图链接', type: 'dash' } });
The text was updated successfully, but these errors were encountered: