I take subtitle from URL and display it in exoplayer, but the subtitle content is full of symbols because the language of the text is Arabic, Greek, Chinese, etc. How do I encode MediaScource to UTF8 before displaying it in the video?
Here is my code to prepare the content of the subtitles:
MediaSource subtitleSource =
new SingleSampleMediaSource
.Factory(dataSourceFactory)
.createMediaSource(
Uri.parse(subtitlesUrl),
subtitleFormat,
C.TIME_UNSET
)
;
With this code it loads the subtitles correctly but only in English.