简体   繁体   中英

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:

在此处输入图片说明

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM