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

custom transport #7009

Open
Dirard opened this issue Feb 8, 2025 · 0 comments
Open

custom transport #7009

Dirard opened this issue Feb 8, 2025 · 0 comments
Labels
Custom loader Feature proposal Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix.

Comments

@Dirard
Copy link

Dirard commented Feb 8, 2025

Is your feature request related to a problem? Please describe.

i have custom transport with refresh token logic with same intrerface as common fetch.
FetchLoader uses fetch, can i replace it with my own?

Describe the solution you'd like

import { Hls, FetchLoader } from 'hls.mjs';

const transport = new CustomTransport()

var video = document.getElementById('video');
if (Hls.isSupported()) {
  var hls = (window.hls = new Hls({
    loader: FetchLoader,
    customFetch: transport.fetch
  })
}

Additional context

No response

@Dirard Dirard added Feature proposal Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Custom loader Feature proposal Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix.
Projects
None yet
Development

No branches or pull requests

2 participants