I am trying to change the http headers sent when using HLS. This is what my current code looks like:
private MediaSource buildMediaStore(String streamUrl) {
Uri streamUri = Uri.parse(streamUrl);
HttpDataSource.Factory dataSourceFactory = new DefaultHttpDataSourceFactory("custom_player", defaultBandwidthMeter);
return new HlsMediaSource.Factory(dataSourceFactory).setExtractorFactory(new DefaultHlsExtractorFactory()).createMediaSource(streamUri);
}
How would I do it? I thought about using the built HttpDataSource but I couldn't pass it into HlsMediaSource or HlsMediaSource.Factory from my knowledge.