瀏覽代碼

ios: fix PiP window sshowing conference controls

The dynamic size of it was causing trouble. Fix it by setting a fixed PiP window
size (150px) which makes it consisstent with what we have on Android.

Fixes: https://github.com/jitsi/jitsi-meet/issues/6562
master
Saúl Ibarra Corretgé 4 年之前
父節點
當前提交
64d74852e0
共有 1 個文件被更改,包括 5 次插入15 次删除
  1. 5
    15
      ios/sdk/src/picture-in-picture/PiPViewCoordinator.swift

+ 5
- 15
ios/sdk/src/picture-in-picture/PiPViewCoordinator.swift 查看文件

@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright @ 2017-present Atlassian Pty Ltd
2
+ * Copyright @ 2017-present 8x8, Inc.
3 3
  *
4 4
  * Licensed under the Apache License, Version 2.0 (the "License");
5 5
  * you may not use this file except in compliance with the License.
@@ -46,18 +46,9 @@ public class PiPViewCoordinator {
46 46
     
47 47
     public var initialPositionInSuperview = Position.lowerRightCorner
48 48
     
49
-    /// The size ratio of the view when in PiP mode
50
-    public var pipSizeRatio: CGFloat = {
51
-        let deviceIdiom = UIScreen.main.traitCollection.userInterfaceIdiom
52
-        switch deviceIdiom {
53
-        case .pad:
54
-            return 0.25
55
-        case .phone:
56
-            return 0.33
57
-        default:
58
-            return 0.25
59
-        }
60
-    }()
49
+    // Unused. Remove on the next major release.
50
+    @available(*, deprecated, message: "The PiP window size is now fixed to 150px.")
51
+    public var c: CGFloat = 0.0
61 52
     
62 53
     public weak var delegate: PiPViewCoordinatorDelegate?
63 54
 
@@ -212,8 +203,7 @@ public class PiPViewCoordinator {
212 203
 
213 204
         // resize to suggested ratio and position to the bottom right
214 205
         let adjustedBounds = bounds.inset(by: dragBoundInsets)
215
-        let size = CGSize(width: bounds.size.width * pipSizeRatio,
216
-                          height: bounds.size.height * pipSizeRatio)
206
+        let size = CGSize(width: 150, height: 150)
217 207
         let origin = initialPositionFor(pipSize: size, bounds: adjustedBounds)
218 208
         return CGRect(x: origin.x, y: origin.y, width: size.width, height: size.height)
219 209
     }

Loading…
取消
儲存