mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
allow user to choose captions color
This commit is contained in:
@@ -68,7 +68,8 @@ final class MPVClient: ObservableObject {
|
||||
checkError(mpv_set_option_string(mpv, "vo", "libmpv"))
|
||||
checkError(mpv_set_option_string(mpv, "demuxer-lavf-analyzeduration", "1"))
|
||||
checkError(mpv_set_option_string(mpv, "deinterlace", Defaults[.mpvDeinterlace] ? "yes" : "no"))
|
||||
checkError(mpv_set_option_string(mpv, "sub-scale", "\(Defaults[.captionsFontScaleSize])"))
|
||||
checkError(mpv_set_option_string(mpv, "sub-scale", Defaults[.captionsFontScaleSize]))
|
||||
checkError(mpv_set_option_string(mpv, "sub-color", Defaults[.captionsFontColor]))
|
||||
|
||||
checkError(mpv_initialize(mpv))
|
||||
|
||||
@@ -414,8 +415,12 @@ final class MPVClient: ObservableObject {
|
||||
setString("sub", "no")
|
||||
}
|
||||
|
||||
func setSubFontSize() {
|
||||
setString("sub-scale", "\(Defaults[.captionsFontScaleSize])")
|
||||
func setSubFontSize(scaleSize: String) {
|
||||
setString("sub-scale", scaleSize)
|
||||
}
|
||||
|
||||
func setSubFontColor(color: String) {
|
||||
setString("sub-color", color)
|
||||
}
|
||||
|
||||
var tracksCount: Int {
|
||||
|
Reference in New Issue
Block a user