mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Use native video call picture in picture! (#3190)
* Use native video call picture in picture! * Handle isSupported, isPossible and web view errors. * Use new canEnterPip method. * Hide a room's Call button when already joined to the call. * Tweak feature flag description. * PR comments.
This commit is contained in:
@@ -77,7 +77,7 @@ struct ElementCallConfiguration {
|
||||
}
|
||||
|
||||
/// A string representing the call being configured.
|
||||
var callID: String {
|
||||
var callRoomID: String {
|
||||
switch kind {
|
||||
case .genericCallLink(let url):
|
||||
url.absoluteString
|
||||
|
||||
@@ -57,9 +57,14 @@ class ElementCallService: NSObject, ElementCallServiceProtocol, PKPushRegistryDe
|
||||
|
||||
private var endUnansweredCallTask: Task<Void, Never>?
|
||||
|
||||
private var ongoingCallID: CallID?
|
||||
private var ongoingCallID: CallID? {
|
||||
didSet { ongoingCallRoomIDSubject.send(ongoingCallID?.roomID) }
|
||||
}
|
||||
|
||||
var ongoingCallRoomID: String? { ongoingCallID?.roomID }
|
||||
let ongoingCallRoomIDSubject = CurrentValueSubject<String?, Never>(nil)
|
||||
var ongoingCallRoomIDPublisher: CurrentValuePublisher<String?, Never> {
|
||||
ongoingCallRoomIDSubject.asCurrentValuePublisher()
|
||||
}
|
||||
|
||||
private let actionsSubject: PassthroughSubject<ElementCallServiceAction, Never> = .init()
|
||||
var actions: AnyPublisher<ElementCallServiceAction, Never> {
|
||||
|
||||
@@ -26,7 +26,7 @@ enum ElementCallServiceAction {
|
||||
protocol ElementCallServiceProtocol {
|
||||
var actions: AnyPublisher<ElementCallServiceAction, Never> { get }
|
||||
|
||||
var ongoingCallRoomID: String? { get }
|
||||
var ongoingCallRoomIDPublisher: CurrentValuePublisher<String?, Never> { get }
|
||||
|
||||
func setClientProxy(_ clientProxy: ClientProxyProtocol)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user