[英]Iframe content does not load in Html widget in Flutter
我正在使用 Html 小部件在 Flutter 和 riod 應用程序中顯示文章內容。內容混合了 html 標簽,並包含一些使用 iframe 嵌入的視頻。小部件顯示一個加載圓圈幾秒鍾,然后沒有顯示。
Flutter 版本 3.3.3
flutter_html: ^3.0.0-alpha.6
預計在應用程序中顯示的示例代碼:
<h3>View more</h3>
<p>This is a sample code for article and video inside artcle body</p>
<div class="h_iframe-aparat_embed_frame"><span style="display: block;padding-top: 57%"></span><iframe src="https://www.aparat.com/video/video/embed/videohash/q0IdU/vt/frame" allowFullScreen="true" webkitallowfullscreen="true" mozallowfullscreen="true"></iframe></div>
<p>Click to view more video</p>
你試過這個嗎?
var html = '''
<iframe width="1200" height='710'
src="$videosid" </iframe>
''';
Column(children:[
**HtmlWidget(html)** OR
InAppWebView(
InAppWebViewInitialData(data: '${html}'),
initialUrlRequest: URLRequest(
url: Uri.parse("${videosid}" ?? ''),
),
),
]
)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.