We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6070d0 commit 73c8848Copy full SHA for 73c8848
lib/src/transformers/node_transformers/passive_embedded_video_transformer.dart
@@ -246,10 +246,12 @@ class _PassiveEmbeddedVideoWidgetState
246
if (!kIsWeb) {
247
// _controller doesn't have a way to dispose the player, so we call
248
// js methods directly.
249
- if (widget.node.properties.source == EmbeddedVideoSource.youtube) {
250
- _controller.runJavaScript('player.stopVideo();');
251
- } else {
252
- _controller.runJavaScript('player.pause();');
+ if (isPlatformSupportedForWebView && !widget.settings.isPreview) {
+ if (widget.node.properties.source == EmbeddedVideoSource.youtube) {
+ _controller.runJavaScript('player.stopVideo();');
+ } else {
253
+ _controller.runJavaScript('player.pause();');
254
+ }
255
}
256
257
0 commit comments