fluttercommunity / fluttercommunity/chewie

Adding tokens to the end of HLS requests

Open
#500 0 comments 5 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
2.1k
Forks
1.1k
Avg merge
6d 8h
Merged PRs (30d)
6

Description

Trying to play HLS videos from cloudfront that require a token appended to the end of each request.

It's easy enough to append the token to the end of the URL for the initial m3u8 file and pass it to the video player. However, I must add the token to the end of each segment request as well. Is there a way to append the token to every request with headers/url changes?

For example, in Javascript with videoJs it might be:
```
videojs.Hls.xhr.beforeRequest = function (options) {
options.uri = `${options.uri}${videojs.getAllPlayers()[0].options().token}`;
return options;
};
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.