Open zjamshidi opened 5 years ago
`private fun initPlayer() { trackSelector = DefaultTrackSelector() exoPlayer = ExoPlayerFactory.newSimpleInstance(context, trackSelector) concatingMediaSource= ConcatenatingMediaSource(getMediaSource(vods)) exoPlayer.prepare(concatingMediaSource) exoPlayer.currentWindowIndex
}
override fun captions(isCaptionOff: Boolean) {
trackSelector.parameters = ParametersBuilder().setRendererDisabled(C.TRACK_TYPE_VIDEO,isCaptionOff).build()
}`
I'm using a "YouTubePlayerFragment" in my android app. According to our requirements, I need to use "CHROMELESS" player style and use custom controllers. Is it any way to show/hide captions programmatically?
Layout
Player Initialization: