xgplayer icon indicating copy to clipboard operation
xgplayer copied to clipboard

一直出现 crypto is not defined 的问题

Open 18678815113 opened this issue 7 months ago • 3 comments

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

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

Image

Image

按官方文档配置的一直出现这个问题,能帮忙看下吗

18678815113 avatar May 07 '25 08:05 18678815113

hls 播放标准加密视频依赖 crypto api 解密,crypto api 需要 HTTPS 或者 localhost 环境

gemxx avatar May 08 '25 03:05 gemxx

hls 播放标准加密视频依赖 crypto api 解密,crypto api 需要 HTTPS 或者 localhost 环境

我换回xgplayer-hls.js 就好了,不明白为啥只有xgplayer-hls 这样。。

18678815113 avatar May 08 '25 06:05 18678815113

hls 播放标准加密视频依赖 crypto api 解密,crypto api 需要 HTTPS 或者 localhost 环境

我换回xgplayer-hls.js 就好了,不明白为啥只有xgplayer-hls 这样。。

hls.js 内部对标准加密解密时,用了 WebCrypto 和 纯JS AES解密两种方案。先用 WebCrypto 解密,如果失败降级到用JS解密。所以不管是否有crypto api都不会报错。目前xgplayer-hls 还不支持纯JS AES解密

gemxx avatar May 09 '25 08:05 gemxx

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.

github-actions[bot] avatar Aug 07 '25 10:08 github-actions[bot]

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!

github-actions[bot] avatar Sep 08 '25 10:09 github-actions[bot]