Thank you, I solved this issue.
I wrote a valid url and it works.
val html = "<iframe src=\"${clipUrl}&parent=${validUrl}\" height=\"360\" width=\"640\" allowfullscreen/>"
val context = LocalContext.current
AndroidView(
factory = {
WebView(context).apply {
webViewClient = WebViewClient()
webChromeClient = WebChromeClient()
settings.javaScriptEnabled = true
loadDataWithBaseURL(validUrl, html, "text/html", "UTF-8", null)
}
}
)
- I set the valid url in the
iframe src - When use webView Api, I set the same valid url:
loadDataWithBaseURL(validUrl, html, "text/html", "UTF-8", null)
And It works fine!
Thank you guys!