|
|
@@ -20,8 +20,20 @@ import Foundation
|
|
20
|
20
|
/// an external window that can be resized and dragged with custom PiP mode
|
|
21
|
21
|
open class JitsiMeetPresentationCoordinator: NSObject {
|
|
22
|
22
|
|
|
23
|
|
- fileprivate let meetViewController: JitsiMeetViewController
|
|
24
|
|
- fileprivate let meetWindow: PiPWindow
|
|
|
23
|
+ public let meetViewController: JitsiMeetViewController
|
|
|
24
|
+ public let meetWindow: PiPWindow
|
|
|
25
|
+
|
|
|
26
|
+ public var isInPiP: Bool {
|
|
|
27
|
+ get {
|
|
|
28
|
+ return meetWindow.isInPiP
|
|
|
29
|
+ }
|
|
|
30
|
+ }
|
|
|
31
|
+
|
|
|
32
|
+ public var jitsiMeetView: JitsiMeetView {
|
|
|
33
|
+ get {
|
|
|
34
|
+ return meetViewController.jitsiMeetView
|
|
|
35
|
+ }
|
|
|
36
|
+ }
|
|
25
|
37
|
|
|
26
|
38
|
public init(meetViewController: JitsiMeetViewController? = nil,
|
|
27
|
39
|
meetWindow: PiPWindow? = nil) {
|
|
|
@@ -34,14 +46,12 @@ open class JitsiMeetPresentationCoordinator: NSObject {
|
|
34
|
46
|
configureMeetViewController()
|
|
35
|
47
|
}
|
|
36
|
48
|
|
|
37
|
|
- public func jitsiMeetView() -> JitsiMeetView {
|
|
38
|
|
- return meetViewController.jitsiMeetView
|
|
39
|
|
- }
|
|
40
|
|
-
|
|
|
49
|
+ /// Show window with jitsi meet and perform a completion closure
|
|
41
|
50
|
open func show(completion: CompletionAction? = nil) {
|
|
42
|
51
|
meetWindow.show(completion: completion)
|
|
43
|
52
|
}
|
|
44
|
53
|
|
|
|
54
|
+ /// Hide window with jitsi meet and perform a completion closure
|
|
45
|
55
|
open func hide(completion: CompletionAction? = nil) {
|
|
46
|
56
|
meetWindow.hide(completion: completion)
|
|
47
|
57
|
}
|
|
|
@@ -77,7 +87,7 @@ extension JitsiMeetPresentationCoordinator: JitsiMeetViewControllerDelegate {
|
|
77
|
87
|
switch to {
|
|
78
|
88
|
case .enterPictureInPicture:
|
|
79
|
89
|
meetWindow.enterPictureInPicture()
|
|
80
|
|
- case .traitChange:
|
|
|
90
|
+ case .sizeChange:
|
|
81
|
91
|
// resize to full screen if rotation happens
|
|
82
|
92
|
if meetWindow.isInPiP {
|
|
83
|
93
|
meetWindow.exitPictureInPicture()
|