Allow entering Pip mode when controls.canEnterPip() cannot be evaluated.
This commit is contained in:
parent
18dcdc0e64
commit
368db3feb4
1 changed files with 2 additions and 1 deletions
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue