Search code examples
iosobjective-cswiftmpmovieplayercontroller

How to handle multiple SRT files on MPMoviePlayerController


I want to do something special with MPMoviePlayerController; So that I can show option for user to select its own choice's subtitle. For example English or Spanish. Currently, i am using mhergon/MPMoviePlayerController-Subtitles but it will just give support of using one subtitle.

I want to show options to user like this image:

enter image description here

If user will tap on Off then no subtitle will be shown (Its working); Now i want to give two language options; Means, two SRT files should work for one video and also they should be properly synced with video timing.

If any one experienced such a work then your help will be more appreciable. I was thinking to make some customisation work within mhergon/MPMoviePlayerController-Subtitles but it may be not good because originally, its writtern for just one subtitle.


Solution

  • I have done changes in mhergon/MPMoviePlayerController-Subtitles to add support of multiple subtitles. If any one needs it in future, please have a look at this library.