扑。当我离开页面时,不要从链接中停止播放mp3文件
我使用HTML类解析HTML页面上的HTML页面。在某些HTML页面上,播放器与MP3文件打开链接。当我离开这些页面时,音乐不会停止播放。如何停止它。
Html(
data: news.dbf_str_content,
style: {
"body": Style(
padding: const EdgeInsets.all(0.0),
margin: const EdgeInsets.all(0.0),
),
"p": Style(
fontFamily: 'FiraSans',
),
},
onLinkTap: (url, _, __, ___) {
if (url.contains("fonds/detail")) {
String isin = url.replaceAll(
"https://www.example.com", "");
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => DetailPage(isin: isin)));
} else {
launchUrl(url);
}
},
),
I parsing html page on flutter using Html class. On some html pages there players which open links with mp3 file. And when i leave these page, music don't stop playing. How stop it.
Html(
data: news.dbf_str_content,
style: {
"body": Style(
padding: const EdgeInsets.all(0.0),
margin: const EdgeInsets.all(0.0),
),
"p": Style(
fontFamily: 'FiraSans',
),
},
onLinkTap: (url, _, __, ___) {
if (url.contains("fonds/detail")) {
String isin = url.replaceAll(
"https://www.example.com", "");
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => DetailPage(isin: isin)));
} else {
launchUrl(url);
}
},
),
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论