I have a custom HttpDataSource called MyDataSource.
To use it with SimpleExoPlayer I do:
MediaSource mediaSource = new ProgressiveMediaSource.Factory(
() -> {
return (HttpDataSource)new MyDataSource(/* some parameters */);
}
).createMediaSource(uri);
Then later when I have MediaSource mediaSource, I want to access inner values from MyDataSource.
How can I do that?
I cannot cast (MyDataSource) mediaSource.
I can however cast it into (ProgressiveMediaSource)mediaSource - however it's useless, because I cannot get any values from MyDataSource, or access the inner MyDataSource in any way.
Thank you.