Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.webkit.CookieManager
import android.webkit.WebView
import android.widget.ProgressBar
import androidx.lifecycle.Observer
Expand Down Expand Up @@ -83,17 +82,11 @@ open class WebViewVideoFragment : BaseVideoWidgetFragment() {
webView.scrollBarStyle = WebView.SCROLLBARS_OUTSIDE_OVERLAY
webView.setOnLongClickListener { true }
webView.isLongClickable = false
// Enable third-party cookies for embedded code content
CookieManager.getInstance().setAcceptThirdPartyCookies(webView, true)
}

open fun loadVideo(content: DomainContent) {
val html = if (video?.embedCode?.contains("class=\"fullscreenContent\"") == true) {
video?.embedCode
} else {
"<div style='margin-top: 15px padding-left: 20px padding-right: 20px'" +
"class='videoWrapper'>" + video?.embedCode + "</div>"
}
val html = "<div style='margin-top: 15px padding-left: 20px padding-right: 20px'" +
"class='videoWrapper'>" + video?.embedCode + "</div>"

webViewUtils.initWebView(html, activity)
webView.webChromeClient = fullScreenChromeClient
Expand Down