huzhiqiang 3 rokov pred
rodič
commit
9ecce17aa2

+ 7 - 3
BFFramework/Classes/Stuckpoint/ViewModel/PQGPUImagePlayerView.swift

@@ -108,7 +108,7 @@ public class PQGPUImagePlayerView: UIView {
     /// Add filters to this array and call updateAsset(_:) method
     public var filters: [ImageProcessingOperation] = []
 
-   public var movie: PQMovieInput?
+    public var movie: PQMovieInput?
 
     public var speaker: SpeakerOutput?
 
@@ -290,7 +290,7 @@ public class PQGPUImagePlayerView: UIView {
     }
 
     // 设置画布比例
-   public func resetCanvasFrame(frame: CGRect) {
+    public func resetCanvasFrame(frame: CGRect) {
         if self.frame.equalTo(frame) {
             FilterLog(message: "新老值一样,不重置")
             return
@@ -311,7 +311,11 @@ public class PQGPUImagePlayerView: UIView {
         playMaskView.frame = CGRect.init(x: 0, y: 0, width: self.frame.width, height: self.frame.height)
         tipLab.frame = CGRect(x: (self.frame.size.width - 100) / 2, y: (self.frame.size.height - 14) / 2, width: 100, height: 14)
         progressLab.frame = CGRect(x: (self.frame.size.width - 140) / 2, y: 8, width: 140, height: 14)
-        playView.frame = CGRect(x: (self.frame.size.width - self.frame.size.height / 3.6) / 2, y: (self.frame.size.height - self.frame.size.height / 3.6) / 2, width: self.frame.size.height / 3.6, height: self.frame.size.height / 3.6)
+
+        let bord = frame.size.width > frame.size.height ? CGFloat(64) : CGFloat(100)
+        playView.frame = CGRect(x: (CGFloat(frame.size.width) - bord) / 2 , y: (CGFloat(frame.size.height) - bord) / 2, width: bord, height: bord)
+    
+//        playView.frame = CGRect(x: (self.frame.size.width - self.frame.size.height / 3.6) / 2, y: (self.frame.size.height - self.frame.size.height / 3.6) / 2, width: self.frame.size.height / 3.6, height: self.frame.size.height / 3.6)
     }
 
     override public func layoutSubviews() {