您使用的西瓜播放器版本是多少? What version of xgplayer are you using?
xgplayer-streaming-shared 3.0.26, current main at 2c4e5f6.
您使用的操作系统和浏览器分别是? What OS and browser are you using?
Windows 11, Node.js 24.14.1. This is reproducible in the repository's Jest mocks for both FetchLoader and XhrLoader, so it does not depend on a particular browser network stack.
如何复现问题? How to reproduce the problem?
Run either existing focused test:
yarn test packages/xgplayer-streaming-shared/__tests__/net/fetch.spec.js --runInBand
yarn test packages/xgplayer-streaming-shared/__tests__/net/xhr.spec.js --runInBand
Both tests request bytes 0-9 and mock a 206 response with Content-Range: bytes 1-10/100 and Content-Length: 10. Neither request enables rangeRequestMustReturn206.
The response-range comparison helpers in packages/xgplayer-streaming-shared/src/net/fetch.js and xhr.js return early unless rangeRequestMustReturn206 is true, even though that option controls whether a non-206 response is permitted, not whether a 206 response's declared range matches the requested bytes.
您期望的播放器正常行为是? What did you expect to happen?
FetchLoader and XhrLoader should reject a 206 response whose Content-Range or Content-Length contradicts the requested byte interval. The existing tests expect the error to identify the mismatch.
实际播放器的表现是? What actually happened?
Both promises resolve and expose the mismatched response data. The focused suites each fail one existing regression test:
- fetch.spec.js: 1 failed, 3 passed
- xhr.spec.js: 1 failed, 3 passed
This can let a server or intermediary's wrong byte segment proceed to media parsing, causing corrupt segment data or misleading downstream decode failures.
可填写您所在的公司和相关产品业务,方便我们提供更好的技术支持 You can write your company and product which uses xgplayer, for helping us provide better technical support.
Independent maintenance audit; no company/product context.
您使用的西瓜播放器版本是多少? What version of xgplayer are you using?
xgplayer-streaming-shared 3.0.26, current main at 2c4e5f6.
您使用的操作系统和浏览器分别是? What OS and browser are you using?
Windows 11, Node.js 24.14.1. This is reproducible in the repository's Jest mocks for both FetchLoader and XhrLoader, so it does not depend on a particular browser network stack.
如何复现问题? How to reproduce the problem?
Run either existing focused test:
Both tests request bytes 0-9 and mock a 206 response with Content-Range: bytes 1-10/100 and Content-Length: 10. Neither request enables rangeRequestMustReturn206.
The response-range comparison helpers in packages/xgplayer-streaming-shared/src/net/fetch.js and xhr.js return early unless rangeRequestMustReturn206 is true, even though that option controls whether a non-206 response is permitted, not whether a 206 response's declared range matches the requested bytes.
您期望的播放器正常行为是? What did you expect to happen?
FetchLoader and XhrLoader should reject a 206 response whose Content-Range or Content-Length contradicts the requested byte interval. The existing tests expect the error to identify the mismatch.
实际播放器的表现是? What actually happened?
Both promises resolve and expose the mismatched response data. The focused suites each fail one existing regression test:
This can let a server or intermediary's wrong byte segment proceed to media parsing, causing corrupt segment data or misleading downstream decode failures.
可填写您所在的公司和相关产品业务,方便我们提供更好的技术支持 You can write your company and product which uses xgplayer, for helping us provide better technical support.
Independent maintenance audit; no company/product context.