Closed chillout23 closed 8 months ago
有这么奇怪的问题啊。你可以看下第二次快速进入的时候,有没有调用
displayManager.preferredDisplayCriteria = AVDisplayCriteria(refreshRate: refreshRate, videoDynamicRange: dynamicRange.rawValue)
这个方法。并且看下是不是 下面这个方法太晚调用了。导致设置的值被清空了。这个方法是在deinit的时候调用的。所以无法控制时间点。
open func playerLayerDeinit() {
#if os(tvOS) || os(xrOS)
UIApplication.shared.windows.first?.avDisplayManager.preferredDisplayCriteria = nil
#endif
}
Thanks @kingslay, were you able to reproduce this yourself by doing the steps?
@kingslay very elegant way to fix this, now it's 100% stable - well done!
tvOS:
In Tracy Player and other apps where KSPlayer is used, frame rate matching is working fine but;
If you open stream = frame rate matches. If you exit stream = frame rate goes back to default. If you open same stream again in 1-2 second (quickly) = framerate does not match. Note: It works again if I wait 5-10 seconds or more.
Frame rate matching in KSPlayer is sensitive to how quickly you exit / enter stream.
Sounds maybe like a quick fix @kingslay if you can look into it.