Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tvos VideoSettingView 显示不正常 #549

Closed
wangliangliang2 opened this issue Sep 13, 2023 · 9 comments
Closed

tvos VideoSettingView 显示不正常 #549

wangliangliang2 opened this issue Sep 13, 2023 · 9 comments

Comments

@wangliangliang2
Copy link

wangliangliang2 commented Sep 13, 2023

使用demo也就是TracyPlayer这个项目。在tvOS16, KSVideoPlayerVIew 中的 VideoSettingView
使用了 Form {
}
会导致选项不能选择【选项内容弹不出】。
该问题develop和main 都有。
使用的视频
【模拟器 tvOS 版本16.4】
建议:
这是改完后的文件
主要内容是:

struct PlatformView<Content: View>: View {
    let content: () -> Content

    var body: some View {
        #if os(tvOS)
        ScrollView {
            content()
        }
        #else
        Form {
            content()
        }
        #endif
        
    }

    init(@ViewBuilder content: @escaping () -> Content) {
        self.content = content
    }
}
PlatformView{
Group{
原内容
}
            #if os(tvOS)
            .padding()
            .pickerStyle(.navigationLink)
            #endif
}

@available(iOS 15, tvOS 16, macOS 12, *) <- 此处需要 tvOS 16
struct VideoSettingView: View

@kingslay

@kingslay
Copy link
Owner

好的,谢谢。我改下

@wangliangliang2
Copy link
Author

wangliangliang2 commented Sep 13, 2023

image 哥们,这里加个padding 呗。 现在选中状态挺丑的。
        ScrollView {
            content()
                .padding()
        }
        .pickerStyle(.navigationLink)

@kingslay

@wangliangliang2
Copy link
Author

另外
ffmpegkit 的这个warning也顺带给解决下怎么样😂 prohibited flag(s): -D_THREAD_SAFE

@kingslay
Copy link
Owner

我也发现这个问题,但是找不到解决的办法。

kingslay added a commit that referenced this issue Sep 13, 2023
@wangliangliang2
Copy link
Author

wangliangliang2 commented Sep 13, 2023

image

感觉是编译时加入的

@kingslay
Copy link
Owner

但是我搜索了ffmpeg的代码也没有找到D_THREAD_SAFE

@kingslay
Copy link
Owner

查了下是sdl2 引入的。把sdl2 注释掉就不会了。但是ffplay需要用到sdl。

@kingslay
Copy link
Owner

kingslay commented Sep 13, 2023

搞错了。升级到最新的sdl还是会有这个警告。

@wangliangliang2
Copy link
Author

好的,谢啦。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants