mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Allow entering Pip mode when controls.canEnterPip() cannot be evaluated.
This commit is contained in:
+2
-1
@@ -26,7 +26,8 @@ class WebViewWebPipApi(
|
||||
override suspend fun canEnterPip(): Boolean {
|
||||
return suspendCoroutine { continuation ->
|
||||
webView.evaluateJavascript("controls.canEnterPip()") { result ->
|
||||
continuation.resume(result == "true")
|
||||
// Note if the method is not available, it will return "null"
|
||||
continuation.resume(result == "true" || result == "null")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user