diff options
author | Allan Wang <me@allanwang.ca> | 2017-10-24 23:29:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-24 23:29:55 -0400 |
commit | c2ca9066c6fd760bd6ef5d2f8f0530a89bfa7b66 (patch) | |
tree | a54665bb873b650b8f6f03b76cd59456ef79e296 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | |
parent | 64dbf74b7a44a25f41ed7ff2ebfa11db0bc91769 (diff) | |
download | frost-c2ca9066c6fd760bd6ef5d2f8f0530a89bfa7b66.tar.gz frost-c2ca9066c6fd760bd6ef5d2f8f0530a89bfa7b66.tar.bz2 frost-c2ca9066c6fd760bd6ef5d2f8f0530a89bfa7b66.zip |
WIP: Feature/pip video 2 (#405)
* Add dependency
* Test new video view
* Add initial video bindings
* Implement drag to dismiss
* Begin initial integration
* Fix typo
* Fix up url formatter
* Update changelog
* Create first fully integrated video build
* Update translations
* Update translations 2
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt index 93d5c773..07703dde 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt @@ -6,6 +6,7 @@ import android.webkit.JavascriptInterface import com.pitchedapps.frost.activities.MainActivity import com.pitchedapps.frost.dbflow.CookieModel import com.pitchedapps.frost.facebook.FbCookie +import com.pitchedapps.frost.facebook.formattedFbUrl import com.pitchedapps.frost.utils.* import io.reactivex.subjects.Subject @@ -36,6 +37,12 @@ class FrostJSI(val webView: FrostWebViewCore) { = if (url == null) false else webView.requestWebOverlay(url) @JavascriptInterface + fun loadVideo(url: String?) { + if (url != null) + webView.post { activity?.showVideo(url) } + } + + @JavascriptInterface fun reloadBaseUrl(animate: Boolean) { L.d("FrostJSI reload") webView.post { |