mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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:
@@ -18,7 +18,7 @@ import AVKit
|
||||
import Foundation
|
||||
|
||||
enum CallScreenViewModelAction {
|
||||
case pictureInPictureStarted(AVPictureInPictureController?)
|
||||
case pictureInPictureStarted(AVPictureInPictureController)
|
||||
case pictureInPictureStopped
|
||||
case dismiss
|
||||
}
|
||||
@@ -36,6 +36,7 @@ struct CallScreenViewState: BindableState {
|
||||
struct Bindings {
|
||||
var javaScriptMessageHandler: ((Any) -> Void)?
|
||||
var javaScriptEvaluator: ((String) async throws -> Any)?
|
||||
var requestPictureInPictureHandler: (() async -> Result<AVPictureInPictureController, CallScreenError>)?
|
||||
|
||||
var alertInfo: AlertInfo<UUID>?
|
||||
}
|
||||
@@ -43,4 +44,10 @@ struct Bindings {
|
||||
enum CallScreenViewAction {
|
||||
case urlChanged(URL?)
|
||||
case navigateBack
|
||||
case pictureInPictureWillStop
|
||||
case endCall
|
||||
}
|
||||
|
||||
enum CallScreenError: Error {
|
||||
case pictureInPictureNotAvailable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user