mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:11:45 +00:00
Automatically adjust the ElementCall PiP when changing orientations
This commit is contained in:
@@ -57,6 +57,9 @@ enum CallScreenJavaScriptMessageName: String, CaseIterable {
|
||||
case onOutputDeviceSelect
|
||||
/// Used to handle the webview back button
|
||||
case onBackButtonPressed
|
||||
/// Used to handle PiP orientation changes
|
||||
case onPipMediaOrientationUpdate
|
||||
|
||||
/// Forward logs to the native side for debugging purposes.
|
||||
case forwardLogs
|
||||
|
||||
@@ -96,6 +99,12 @@ enum CallScreenJavaScriptMessageName: String, CaseIterable {
|
||||
window.webkit.messageHandlers.\(rawValue).postMessage("");
|
||||
}
|
||||
"""
|
||||
case .onPipMediaOrientationUpdate:
|
||||
"""
|
||||
window.controls.\(rawValue) = (orientation) => {
|
||||
window.webkit.messageHandlers.\(rawValue).postMessage(orientation);
|
||||
}
|
||||
"""
|
||||
case .forwardLogs:
|
||||
"""
|
||||
(function() {
|
||||
|
||||
Reference in New Issue
Block a user