I im using ExoPlayer and need to call private function from another class:
to call function:
getRendererBuilder(MediaSourceType, Uri, MediaUtil.MediaType)
I got MediaSourceType, Uri and MediaUtil.MediaType so because this function is hidden in class it is defined like this:
public class EMVideoView
extends RelativeLayout
implements AudioCapabilitiesReceiver.Listener, VideoTextureView.OnSizeChangeListener {
private RenderBuilder getRendererBuilder(MediaSourceType renderType, Uri uri, MediaUtil.MediaType defaultMediaType)
{
switch (renderType)
{
case HLS:
return new HlsRenderBuilder(getContext().getApplicationContext(), getUserAgent(), uri.toString());
case DASH:
return new DashRenderBuilder(getContext().getApplicationContext(), getUserAgent(), uri.toString());
case SMOOTH_STREAM:
return new SmoothStreamRenderBuilder(getContext().getApplicationContext(), getUserAgent(), uri.toString());
}
return new RenderBuilder(getContext().getApplicationContext(), getUserAgent(), uri.toString());
}
I im working with this class
public class ExoPlayer extends ViewWrapper<EMVideoView> {
// HERE I NEED TO CALL getRendererBuilder and pass the parameters
EMVideoView.setVideoURI(Uri, getRendererBuilder(renderType, uri, defaultMediaType));
}
How to call private function getRendererBuilder from my class? I im beginner and need to finish wrapper library...so example code will be very nice to learn.
Thanks.