Skip to content
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 source option to prevent usage of HLS native implementation #386

Merged
merged 2 commits into from
Oct 13, 2023

Conversation

marcosbozza
Copy link
Contributor

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:

sources: [
    {
        type: 'hls',
        file: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8',
        overrideNative: true,
    }
]

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.

@SangwonOh SangwonOh self-requested a review October 13, 2023 09:30
Copy link
Member

@SangwonOh SangwonOh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for quick response!

@SangwonOh SangwonOh merged commit baa48fb into AirenSoft:master Oct 13, 2023
@dygy
Copy link
Contributor

dygy commented Oct 31, 2023

@marcosbozza hi, have you tested a new code?
i've installed ovenplayer like this
"ovenplayer": "git://github.com/AirenSoft/OvenPlayer.git#1e4a3d396ba59abb359aa867c00b782b84747811",
i've made config like this
type: "hls", file: url, overrideNative: true, sectionStart: 3,
in fact, i've seen native implementation and none of op_hls were created. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants