-
-
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
Add crossdomain support in http_remux and hls for HTML5 playback #691
Conversation
Crossdomain should not be specified through configuration. It can be determined based on the request. If a crossdomain request is made, it should be included in the response. Additionally, the headers should not only include ALLOW ORIGIN, but also specify the allowed methods using ALLOW METHODS. You can refer to the handling of HTTP APIs for guidance.
|
In addition, if it can be achieved through an HTTP proxy, such as using ORYXY's HTTPLB proxy once, with cross-origin support, it will be much simpler.
|
Because OPTIONS is not necessary in normal live streaming scenarios, Allow Methods should be unnecessary.
|
I made a GET request for http-flv using JavaScript, which should require ALLOW: GET request. Additionally, it seems that JavaScript cannot directly access this type of long connection http-flv. Is there a new standard that supports it?
HTTP Request Tool:
|
In addition, this belongs to the functionality and will definitely not be added in SRS2. I will include this feature in the develop.
|
I first improved part of the HTTP-API and made changes to conveniently support CORS for HTTP-FLV.
|
In addition, we are planning to remove HLS RAM as it does not support memory distribution for HLS. It can be achieved using memory disks, which unnecessarily adds a lot of complexity.
|
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.
|
|
Understood, it's not xhr, it's a new JS API.
|
Long time no response, create a new #798 memo.
|
When using flv.js to play FLV, there may be a cross-origin issue. To solve this, add
|
For flv.js or hls.js HTML5 playback,
CORS header (Access-Control-Allow-Origin) is necessary for ajax stream fetching.
This pull request adds
crossdomain on;
config support inhttp_remux
andhls
block,which will emit
Access-Control-Allow-Origin: *
header inhttp-flv
stream or hlsm3u8/ts
GET
request.CORS header will not affect exisiting service, so it is turned on by default for now.
Changes may be inappropriate, suggestion or modification please!