来自 Youtube 嵌入式视频的音频在 Web 视图关闭后继续播放 - 颤振



我正在使用Flutter中的flutter_webview_plugin与MaterialPageRoute创建一个Web视图。

 Navigator.of(videoContext).push(
      new MaterialPageRoute(builder: (context) {
             return new WebviewScaffold(
                 url: "https://www.youtube.com/embed/fq4N0hgOWzU",
                 appBar: new AppBar(
                         title: new Text("flutter"),
                         backgroundColor: Colors.black,
                         ),
                       );
                  }));

单击左上角的后退按钮后,Web 视图已关闭,但音频仍在继续播放。

插件页面上的示例无济于事。 (https://pub.dartlang.org/packages/flutter_webview_plugin#-example-tab-(

如果有人能告诉我正确的方向,我将不胜感激。

[更新]
这看起来像是Assus Zenfone 5(android 4.4(模型的问题。
代码在Moto G3上运行良好。

不要忘记处理网络视图

 flutterWebviewPlugin.dispose()

从文档中

最新更新