youtube_player_flutter
youtube_player_flutter copied to clipboard
[BUG] Video flickering on Firefox WEB
Describe the bug The video widget is flickering whenever my mouse hovers it. Happens only on firefox, on chrome it's working well.
I had already some issues before, I had to add
WebViewPlatform.instance = WebYoutubePlayerIframePlatform();
on the initState of the widget.
Screenshots
https://github.com/sarbagyastha/youtube_player_flutter/assets/66113155/7cd089b5-564d-4ef1-a741-2028cb960d6b
Here is the console log
RuntimeError: index out of bounds
CanvasKitInit https://www.gstatic.com/flutter-canvaskit/04817c99c9fd4956f27505204f7e344335810aed/canvaskit.js:115
beginRecording https://www.gstatic.com/flutter-canvaskit/04817c99c9fd4956f27505204f7e344335810aed/canvaskit.js:57
o https://test.tiqit.fr/main.dart.js:9258
pV https://test.tiqit.fr/main.dart.js:36726
TypeError: Instance of 'minified:jc<Object?, Object?>': type 'minified:jc<Object?, Object?>' is not a subtype of type 'String'
c https://test.tiqit.fr/main.dart.js:5225
aK https://test.tiqit.fr/main.dart.js:5977
$1 https://test.tiqit.fr/main.dart.js:114712
$1 https://test.tiqit.fr/main.dart.js:114202
bkw https://test.tiqit.fr/main.dart.js:5187
bpq https://test.tiqit.fr/main.dart.js:9250
Technical Details:
- OS: Windows, Firefox ( I also tried on Linux same problem)
Additional context Here is the code even if it's pretty basic
class _EditableTiqVideoWidgetState extends State<EditableTiqVideoWidget> {
late YoutubePlayerController _controller;
@override
void initState() {
super.initState();
WebViewPlatform.instance = WebYoutubePlayerIframePlatform();
_controller = YoutubePlayerController.fromVideoId(
params: YoutubePlayerParams(
showControls: widget.tiqContent.showControls,
),
videoId: widget.tiqContent.videoId,
autoPlay: widget.tiqContent.autoPlay);
}
@override
Widget build(BuildContext context) {
// return Container();
return Column(
children: [
Padding(
padding: const EdgeInsets.only(right: 16),
child: Stack(
children: [
YoutubePlayer(
controller: _controller,
aspectRatio: 16 / 9,
enableFullScreenOnVerticalDrag: false,
),
],
),
),
],
);
}
}
This issue can also be reproduced with the example project on firefox. https://sarbagyastha.github.io/youtube_player_flutter/ It's a huge blocker...
I've had the same experience. I thought it was related to running the video in an overlay, but that doesn't seem to be the case. Definitely annoying especially since there doesn't seem to be a workaround.