How to display subtitles within MPMoviePlayerController

后端 未结 3 2076
刺人心
刺人心 2021-02-09 00:12

I built a custom video player, all buttons are working. I need to know what is the code that does the MPMoviePlayerController display subtitles when the video has that option. I

3条回答
  •  清酒与你
    2021-02-09 01:17

    If your media file has embedded captions MPMoviePlayerViewController will show a button to enable/disable captions. By default, captions are disabled and can not be activated programatically.

    Instead, you could use AVPlayer with closedCaptionDisplayEnabled property. But only iOS 4+

提交回复
热议问题