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
869 stars 184 forks source link

Small subtitles on iPad #708

Closed neckaros closed 4 months ago

neckaros commented 6 months ago

Describe the bug iPad fall in the iOS category but usually has larger screen

To Reproduce Play a video with subtitle on iPad

Additional context from my understanding issue comes from here:

            case .standard:
                #if os(tvOS)
                return 58
                #elseif os(macOS)
                return 26
                #else
                return 16
                #endif

maybe adding a if iPadOS would solve the issue?

            case .standard:
                #if os(tvOS)
                return 58
                #elseif os(macOS)
                return 26
                #else
                if UIDevice.current.userInterfaceIdiom == .pad {
                  return 26
                } else {
                  return 16
                }
                #endif

Also not sure how we are supposed to use the other sizes has public static var textFontSize = SubtitleModel.Size.standard.rawValue is a static

kingslay commented 6 months ago

你可以发起个Pull requests 改下pad的字体大小

neckaros commented 6 months ago

Submitted PR.

What about the possibility to switch from smaller/small/larger size?

kingslay commented 6 months ago

可以的。这个size属性是一个全局静态变量。外面可以任意更改