aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2020-02-23 18:18:01 -0800
committerGitHub <noreply@github.com>2020-02-23 18:18:01 -0800
commit358cd0771de790e299ff8516d422f9b8e075c4e2 (patch)
treea3c6c580d3521acbade1389028a497a00ec7aa1a /app/src/main
parent78b972e104e96e2ffe7e48b8d9cad2c9d48c40d9 (diff)
parentbd1876136a80b4e10dc50fc8fbd1b55ab4dacb94 (diff)
downloadfrost-358cd0771de790e299ff8516d422f9b8e075c4e2.tar.gz
frost-358cd0771de790e299ff8516d422f9b8e075c4e2.tar.bz2
frost-358cd0771de790e299ff8516d422f9b8e075c4e2.zip
Merge pull request #1648 from AllanWang/default-video-poster
Add default video poster
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
index 03bfacd5..bdaf22ba 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostChromeClients.kt
@@ -16,6 +16,7 @@
*/
package com.pitchedapps.frost.web
+import android.graphics.Bitmap
import android.net.Uri
import android.webkit.ConsoleMessage
import android.webkit.GeolocationPermissions
@@ -52,6 +53,10 @@ class FrostChromeClient(web: FrostWebView) : WebChromeClient() {
private val activity = (web.context as? ActivityContract)
private val context = web.context!!
+ override fun getDefaultVideoPoster(): Bitmap? =
+ super.getDefaultVideoPoster()
+ ?: Bitmap.createBitmap(50, 50, Bitmap.Config.ARGB_8888)
+
override fun onConsoleMessage(consoleMessage: ConsoleMessage): Boolean {
L.v { "Chrome Console ${consoleMessage.lineNumber()}: ${consoleMessage.message()}" }
return true