-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
When my page loads, while attempting to load certain .webm videos from a network source on Firebase Storage, I receive the error below. The audio from the video begins to automatically play even before _controller.play() is triggered and the video is not visible on the screen. This issue does not occur when loading .mp4 files from the same Firebase Storage instance and only occurs with some .webm files.
Below are two sample videos, one an .webm video that can be used to reproduce the issue and the other a .mp4 to verify that this issue does not occur with .mp4 videos stored on the same Firebase Storage instance.
Strangely, this is not a problem when using the .webm video at "https://dl8.webmfiles.org/big-buck-bunny_trailer.webm". I also uploaded this video to my Firebase Storage instance and it works. So I don't think Firebase Storage is the issue rather something to do with the other video files. The video files that cause the problem are able to be opened and played in a chrome browser if you simply paste the link. The error produced in the logs doesn't give me much to go on.
Reproducible code:
This issue is reproducible using the video_player package’s example code.
Links for testing / reproducing
webm (not working): https://firebasestorage.googleapis.com/v0/b/disc-doctor-284de.appspot.com/o/form_review%2F1654157014042.webm?alt=media&token=04d61a4f-8b8f-47aa-bf9e-c063740fe48d
Running with:
flutter run -d chrome --web-renderer html
pubspec.yaml
video_player: ^2.3.0
Video player package information from logs:
[ ] Found plugin video_player at /Users/…/development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player-2.3.0/
[ ] Found plugin video_player_android at /Users/…/development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_android-2.3.1/
[ ] Found plugin video_player_avfoundation at /Users/…/development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_avfoundation-2.3.1/
[ ] Found plugin video_player_web at /Users/…/development/flutter/.pub-cache/hosted/pub.dartlang.org/video_player_web-2.0.7/
Flutter doctor:
[✓] Flutter (Channel stable, 3.0.1, on macOS 12.2.1 21D62 darwin-arm, locale en-AU)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
• No issues found!
Error:
Error: Unsupported operation: Infinity
at Object.throw_ [as throw] (http://localhost:56005/dart_sdk.js:5405:11)
at [dartx.round] (http://localhost:56005/dart_sdk.js:18483:17)
at video_player_web._VideoPlayer.new.sendInitialized (http://localhost:56005/packages/video_player_web/video_player_web.dart.lib.js:392:259)
at http://localhost:56005/packages/video_player_web/video_player_web.dart.lib.js:325:16
at Object._checkAndCall (http://localhost:56005/dart_sdk.js:5609:16)
at Object.dcall (http://localhost:56005/dart_sdk.js:5614:17)
at HTMLVideoElement. (http://localhost:56005/dart_sdk.js:115590:21)