url 配置为数组是提示不支持视频格式
您使用的西瓜播放器版本是多少? What version of xgplayer are you using? "xgplayer": "^3.0.14",
您使用的操作系统和浏览器分别是? What OS and browser are you using? mac 13.5.1 chrome 124.0.6367.60
如何复现问题? How to reproduce the problem? 配置 url 为数组即可复现
您期望的播放器正常行为是? What did you expect to happen? 正常播放
实际播放器的表现是? What actually happened?
可填写您所在的公司和相关产品业务,方便我们提供更好的技术支持 You can write your company and product which uses xgplayer, for helping us provide better technical support.
如果是这样配置则可以显示视频请求,但是 http 状态ma码 是206,还是无法播放
两个插件同时使用时。m3u8视频无法播放
如果是这样配置则可以显示视频请求,但是 http 状态ma码 是206,还是无法播放
hi,我遇到过类似的需求。你可以尝试在 new Player 的时候传入一个函数, ...getVideoConfig(url)。然后函数里面根据流地址的格式,去形成集成不同的插件配置。
function getVideoConfig(url: string) {
const extension = url.toLowerCase().split('.').pop();
switch (extension) {
case 'm3u8':
return {
plugins: [HlsPlugin],
};
case 'flv':
return {
plugins: [FlvPlugin],
isLive: true,
};
}
如果是这样配置则可以显示视频请求,但是 http 状态ma码 是206,还是无法播放
hi,我遇到过类似的需求。你可以尝试在 new Player 的时候传入一个函数, ...getVideoConfig(url)。然后函数里面根据流地址的格式,去形成集成不同的插件配置。
function getVideoConfig(url: string) { const extension = url.toLowerCase().split('.').pop(); switch (extension) { case 'm3u8': return { plugins: [HlsPlugin], }; case 'flv': return { plugins: [FlvPlugin], isLive: true, }; }
hello,那有没有遇到过 url 配制成数组但是无法播放的情况呢,目前我只能配一个播放地址,并不能让播放器自动选择可以播放的播放地址
如果是这样配置则可以显示视频请求,但是 http 状态ma码 是206,还是无法播放
hi,我遇到过类似的需求。你可以尝试在 new Player 的时候传入一个函数, ...getVideoConfig(url)。然后函数里面根据流地址的格式,去形成集成不同的插件配置。
function getVideoConfig(url: string) { const extension = url.toLowerCase().split('.').pop(); switch (extension) { case 'm3u8': return { plugins: [HlsPlugin], }; case 'flv': return { plugins: [FlvPlugin], isLive: true, }; }hello,那有没有遇到过 url 配制成数组但是无法播放的情况呢,目前我只能配一个播放地址,并不能让播放器自动选择可以播放的播放地址
url 配置成数组,我还没有测试过
如果是这样配置则可以显示视频请求,但是 http 状态ma码 是206,还是无法播放
hi,我遇到过类似的需求。你可以尝试在 new Player 的时候传入一个函数, ...getVideoConfig(url)。然后函数里面根据流地址的格式,去形成集成不同的插件配置。
function getVideoConfig(url: string) { const extension = url.toLowerCase().split('.').pop(); switch (extension) { case 'm3u8': return { plugins: [HlsPlugin], }; case 'flv': return { plugins: [FlvPlugin], isLive: true, }; }hello,那有没有遇到过 url 配制成数组但是无法播放的情况呢,目前我只能配一个播放地址,并不能让播放器自动选择可以播放的播放地址
因为我在开发的时候,没有遇到把 mp4\flv\hls 同时播放的情况
如果是这样配置则可以显示视频请求,但是 http 状态ma码 是206,还是无法播放
hi,我遇到过类似的需求。你可以尝试在 new Player 的时候传入一个函数, ...getVideoConfig(url)。然后函数里面根据流地址的格式,去形成集成不同的插件配置。
function getVideoConfig(url: string) { const extension = url.toLowerCase().split('.').pop(); switch (extension) { case 'm3u8': return { plugins: [HlsPlugin], }; case 'flv': return { plugins: [FlvPlugin], isLive: true, }; }hello,那有没有遇到过 url 配制成数组但是无法播放的情况呢,目前我只能配一个播放地址,并不能让播放器自动选择可以播放的播放地址
因为我在开发的时候,没有遇到把 mp4\flv\hls 同时播放的情况
好的好的,感谢回答
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue has been automatically closed after a period of inactivity. If it is still present in the latest release, please create a new issue with up-to-date information. Thank you!
