-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
HTTP Stream supports CROS cross-domain #717
Comments
HTTP API automatically supports CROS (Cross-Origin Resource Sharing) for convenient access by JavaScript. If HTTP Stream needs to support MSE (Media Source Extensions), it also needs to support JavaScript access, which means supporting CROS cross-origin.
|
Already supported, but I couldn't make it work in chrome54. I guess it's because I'm not using the correct way to initiate the xhr request. You can give it a try, it's added in 3.0.9.
|
Before the refinement, the changes can be found here: https://github.com/ossrs/srs/pull/691/files After the refinement, the changes can be found here: b231550 First refactor, improving existing API's CORS: f30b307 Second refactor, removing HLS RAM: 664844b With less code, achieve more comprehensive functionality. The latter also supports reload, and the configuration file has been updated. If we count the two refactors, the latter will definitely have more code than the former, but refactor is not directly related to adding new functionality; it improves the existing code. Therefore, it is recommended to perform necessary refactoring before adding new functionality.
|
Note that if Nginx has set the cross-origin header, SRS3 will also set it once, which will cause this error. This means that there are two cross-origin headers, which can be disabled in SRS3 by turning off CORS.
Alternatively, you can remove this header setting from Nginx or use
|
What should I do with 'srs2'?
|
Reference: #691, Add crossdomain support in http_remux and hls for HTML5 playback.
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: