-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to load multiple subtitles before preparing player and switch subtitles on runtime dynamically without preparing the player again? i am using exo player version 2.16.1 #9955
Comments
I think you're creating the source correctly, except that generally you'd expect each subtitle to differ somehow other than just the During playback, you can change the selected subtitle track using ExoPlayer's track selection APIs. these are documented here. |
yes the subtitles are of different language i.e Arabic and English but the thing is i can only parse one uri of subtitle before preparing the player. all i need to know is how to load list of subtitles and than prepare media player than i can change them dynamically without preparing the media player again. |
You need all of the subtitle URIs available in advance to build the |
No i have list of subtitles before preparing the media player. All i want to do is load that list of subtitles before preparing the player and than i want to change the subtitles on button click. i have two button in the app one for english and one for arabic when i click on arabic it should show arabic subtitles and when click on english should show english subtitles. i want to load both subtitles before preparing the player. right now i am loading single subtitle and it is working good. but my question is how to load both subtitles before preparing media player. |
I think I've already answered the question.
|
val subtitle = subTiltesList?.let { see this i have list but Uri.parse(it[i]) it takes one item not list. also mediaitem.Builder.setSubtitles(subtitles) it takes one item. how i should pass a list? |
can you provide me a sample code to load subtitles list that will be really helpful |
and the actual source code here: If you need help on creating a list in Kotlin, I'd suggest you ask on StackOverflow since this is a general programming question unrelated to ExoPlayer. |
Thanks that's what i needed |
this is how i am loading subttiles. it's working fine for one but i want to pass list of subtitles before preparing media player and than switch subtitles from the list
The text was updated successfully, but these errors were encountered: