debugly / ijkplayer

【持续更新】macOS/iOS video player based on ijkplayer, using FFmpeg 5.1, support Metal、hw accel、HDR、ass subtitle effect...
GNU General Public License v2.0
69 stars 14 forks source link

字幕的文字颜色无法改变 #17

Closed zdw19840929 closed 1 month ago

zdw19840929 commented 1 month ago

player = IJKFFMoviePlayerController(contentURL: url, with: self.options) player?.allowsMediaAirPlay = true player?.setPauseInBackground(false) player?.scalingMode = .aspectFit player?.enableAccurateSeek(true) if var p = self.player?.subtitlePreference { p.color = UInt32(self.subtitleColor); p.strokeColor = UInt32(self.subtitleStrokeColor) p.scale = Float(self.subTitleSize) p.bgColor = UInt32(self.subtitleBgColor) self.player?.subtitlePreference = p } @debugly 大佬有时间帮我看看这个问题,设置了字幕的文字颜色,但是始终显示都是白色,但设置字幕大小是可以的。

debugly commented 1 month ago

字幕使用了libass渲染,当前版本不支持设置颜色,仅支持大小和位置的改变,下个版本将会支持强制覆盖颜色、字体等。

zdw19840929 commented 1 month ago

好的 谢谢大佬的解答 期待下个版本更新