Jeg vil legge til undertekst fra lokal lagring på ExoPlayer men alle løsninger var for fjernkontroll som prøver jeg under koden, men vil ikke ord.
File file = new File(Environment.getExternalStoragePublicDirectory(), subtitle1.srt);
SingleSampleMediaSource frSource = new SingleSampleMediaSource(
Uri.parse(file.getAbsolutePath()),
dataSourceFactory,
Format.createTextSampleFormat(null, MimeTypes.APPLICATION_SUBRIP, 25, fa),
C.TIME_UNSET);
mediaSources[1] = frSource;