Skip to content

Commit 368db3f

Browse files
committed
Allow entering Pip mode when controls.canEnterPip() cannot be evaluated.
1 parent 18dcdc0 commit 368db3f

File tree

1 file changed

+2
-1
lines changed
  • features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils

1 file changed

+2
-1
lines changed

features/call/impl/src/main/kotlin/io/element/android/features/call/impl/utils/WebViewWebPipApi.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class WebViewWebPipApi(
2626
override suspend fun canEnterPip(): Boolean {
2727
return suspendCoroutine { continuation ->
2828
webView.evaluateJavascript("controls.canEnterPip()") { result ->
29-
continuation.resume(result == "true")
29+
// Note if the method is not available, it will return "null"
30+
continuation.resume(result == "true" || result == "null")
3031
}
3132
}
3233
}

0 commit comments

Comments
 (0)