kingslay / KSPlayer

A video player for iOS、macOS、tvOS、visionOS , based on AVPlayer and FFmpeg, support the horizontal, vertical screen. support adjust volume, brightness and seek by slide, support subtitles.
GNU General Public License v3.0
887 stars 184 forks source link

Extend KSOptions #671

Closed Alanko5 closed 5 months ago

Alanko5 commented 7 months ago

It would be very useful to have a "wantedSubtitle" method. for example:

func wantedSrt(subtitles: [(title: String?, language: String?)]) -> Int?

If I find that I don't have audio available, I will be able to set subtitles at least.

kingslay commented 7 months ago

文字字幕流我默认都是会enable的。图片字幕的只有流信息标为forced,我才会enable。所以如果是文件字幕是不需要wantedSrt的。而且字幕的是否显示是要对selectedSubtitleInfo进行设置值才有效果的。不是由KSMEPlayer来控制字幕的显示的。是由SubtitleModel控制的。

Alanko5 commented 7 months ago

That is, if I also set the subtitles in the func wantedAudio(infos...) method, will it be OK?

kingslay commented 7 months ago

不行的。因为他们是分开的