Skip to content
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

xgplayer-hls插件使用后,原本可以播放的MP4不能播放了 #1387

Open
wangshunzi opened this issue Apr 15, 2024 · 2 comments
Open
Labels
duplicate This issue or pull request already exists

Comments

@wangshunzi
Copy link

wangshunzi commented Apr 15, 2024

您使用的西瓜播放器版本是多少? What version of xgplayer are you using?
3.0.13

您使用的操作系统和浏览器分别是? What OS and browser are you using?
win11, chrome

如何复现问题? How to reproduce the problem?
SimplePlayer, 配置插件 HLSPlugin 后,播放 .mp4 视频

您期望的播放器正常行为是? What did you expect to happen?
可以根据链接识别,正常播放;传入的是m3u8链接则播放m3u8; 传入 mp4 则播放mp4

实际播放器的表现是? What actually happened?
提示“不支持的视频/音频格式”

可填写您所在的公司和相关产品业务,方便我们提供更好的技术支持 You can write your company and product which uses xgplayer, for helping us provide better technical support.
短视频

@itchaox
Copy link

itchaox commented Apr 24, 2024

您使用的西瓜播放器版本是多少? What version of xgplayer are you using? 3.0.13

您使用的操作系统和浏览器分别是? What OS and browser are you using? win11, chrome

如何复现问题? How to reproduce the problem? SimplePlayer, 配置插件 HLSPlugin 后,播放 .mp4 视频

您期望的播放器正常行为是? What did you expect to happen? 可以根据链接识别,正常播放;传入的是m3u8链接则播放m3u8; 传入 mp4 则播放mp4

实际播放器的表现是? What actually happened? 提示“不支持的视频/音频格式”

可填写您所在的公司和相关产品业务,方便我们提供更好的技术支持 You can write your company and product which uses xgplayer, for helping us provide better technical support. 短视频

根据不同的流地址,配置不同的插件,在 hls 流地址时,才配置 HlsPlugin,可以通过在 new Player 中传入一个函数来判断

@gemxx
Copy link
Collaborator

gemxx commented May 14, 2024

@wangshunzi @itchaox 由于有些公司在hls流地址不一定含有m3u8,而是动态地址,因此单独判断播放地址的后缀,不太可行。建议是初始化播放器之前,前置检测好提供的视频是否为hls,然后再集成xgplayer-hls插件。

@gemxx gemxx added the duplicate This issue or pull request already exists label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants