Closed chenghuaWang closed 1 year ago
Please try using flutter_html 3.0.0-alpha.5 along with flutter_html_iframe 3.0.0-alpha.4 to see if that resolves your issue. Thanks!
3ks, It solved this problem. And I just find flutter_html_iframe 3.0.0-alpha.3 instead of alpha.4, is it a typo ?
Solution just as @Sub6Resources said, Using flutter_html 3.0.0-alpha.5 along with flutter_html_iframe 3.0.0-alpha.3. There is no need to modify the HTML code. The widget is constructed with the settings below:
Html(
data: src_url,
style: {
"iframe": Style(
width: MediaQuery.of(context).size.width,
height: (MediaQuery.of(context).size.width / 16.0) * 9.0,
),
},
customRenders: {
iframeMatcher(): iframeRender(),
},
);
Ah, yes, that was a typo. Glad it resolved your issue!
Describe the bug:
The flutter_html version I used is 2.2.1. And I am trying to bring a HTML video player(Such as YouTube, BiliBili) to the flutter widget. The program works really fine on web(Chrome), but failed on Android(SDK 32). And it throw error
updateAcquireFence: Did not find frame
.The full log is bellow:
HTML to reproduce the issue:
The HTML code I used is quite common.
<iframe width="$videoWidth" src="https://player.bilibili.com/player.html?aid=80433022&bvid=BV1GJ411x7h7&cid=137649199&page=1" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"> </iframe>
where thevideoWidth
is get from flutter context.Html
widget configuration:The way I using HTML class is quite straight.
Expected behavior:
It expected to show the widget like below
Device details and Flutter/Dart/
flutter_html
versions:Flutter SDK = ^3.3.2 flutter_html = ^2.2.1