Add source option to prevent usage of HLS native implementation #386
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new optional boolean option called
overrideNative
to a stream source to prevent the use of some browser's native HLS capabilities. This forces the use of Media Source Extensions to provide a more consistent experience between browsers.The use case where we encountered problems with HLS was on Safari when trying to modify the XHR requests. Since it is native on Safari, it is not a XHR request, making it impossible to modify the requests.
Example of usage:
This options was inspired by the options with same name in HLS plugin for VideoJS
https://github.com/videojs/http-streaming#overridenative
This is our first PR to contribute to OvenPlayer. We had a good experience using it so far and we are glad to be able to contribute. Please let us know if this new options makes sense and any changes we might have to address.