Alternative fix

This commit is contained in:
Isaac
2024-12-24 09:16:23 +08:00
parent ec244016c8
commit 7e2b8b31f7
3 changed files with 9 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ public struct HLSCodecConfiguration {
public extension HLSCodecConfiguration {
init(context: AccountContext) {
var isSoftwareAv1Supported = false
/*var isSoftwareAv1Supported = false
var isHardwareAv1Supported = false
var length: Int = 4
@@ -44,7 +44,9 @@ public extension HLSCodecConfiguration {
isSoftwareAv1Supported = value != 0.0
}
self.init(isHardwareAv1Supported: isHardwareAv1Supported, isSoftwareAv1Supported: isSoftwareAv1Supported)
self.init(isHardwareAv1Supported: isHardwareAv1Supported, isSoftwareAv1Supported: isSoftwareAv1Supported)*/
self.init(isHardwareAv1Supported: false, isSoftwareAv1Supported: false)
}
}

View File

@@ -1103,7 +1103,8 @@ final class HLSVideoJSNativeContentNode: ASDisplayNode, UniversalVideoContentNod
self.contextDisposable = SharedHLSVideoJSContext.shared.register(context: self)
self.playerNode.frame = CGRect(origin: CGPoint(), size: self.intrinsicDimensions)
var didProcessFramesToDisplay = false
/*var didProcessFramesToDisplay = false
self.playerNode.isHidden = true
self.playerNode.hasSentFramesToDisplay = { [weak self] in
guard let self, !didProcessFramesToDisplay else {
@@ -1111,7 +1112,7 @@ final class HLSVideoJSNativeContentNode: ASDisplayNode, UniversalVideoContentNod
}
didProcessFramesToDisplay = true
self.playerNode.isHidden = false
}
}*/
//let thumbnailVideoReference = HLSVideoContent.minimizedHLSQuality(file: fileReference)?.file ?? fileReference

View File

@@ -274,7 +274,7 @@ private final class NativeVideoContentNode: ASDisplayNode, UniversalVideoContent
super.init()
var didProcessFramesToDisplay = false
/*var didProcessFramesToDisplay = false
self.playerNode.isHidden = true
self.playerNode.hasSentFramesToDisplay = { [weak self] in
guard let self, !didProcessFramesToDisplay else {
@@ -283,7 +283,7 @@ private final class NativeVideoContentNode: ASDisplayNode, UniversalVideoContent
didProcessFramesToDisplay = true
self.playerNode.isHidden = false
self.hasSentFramesToDisplay?()
}
}*/
if let dimensions = hintDimensions {
self.dimensions = dimensions