Closed zdw19840929 closed 6 months 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 大佬有时间帮我看看这个问题,设置了字幕的文字颜色,但是始终显示都是白色,但设置字幕大小是可以的。
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 }
字幕使用了libass渲染,当前版本不支持设置颜色,仅支持大小和位置的改变,下个版本将会支持强制覆盖颜色、字体等。
好的 谢谢大佬的解答 期待下个版本更新
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 大佬有时间帮我看看这个问题,设置了字幕的文字颜色,但是始终显示都是白色,但设置字幕大小是可以的。