1
0
mirror of https://github.com/AllanWang/Frost-for-Facebook.git synced 2024-11-08 12:02:33 +01:00

Add default video poster

This commit is contained in:
Allan Wang 2020-02-23 17:57:33 -08:00
parent 654cc6b943
commit bd1876136a
No known key found for this signature in database
GPG Key ID: C93E3F9C679D7A56

View File

@ -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