Skip to content

Issue when trying to play certain .webm videos from a network source #105649

@skypopcorn1

Description

@skypopcorn1

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

webm (working): https://firebasestorage.googleapis.com/v0/b/disc-doctor-284de.appspot.com/o/form_review%2Fbig-buck-bunny_trailer.webm?alt=media&token=0eebd572-3b46-4b2a-a95e-a73d43989d5e

mp4 (working): https://firebasestorage.googleapis.com/v0/b/disc-doctor-284de.appspot.com/o/form_review_pro_examples%2Fcatrina_allen_side.mp4?alt=media&token=3f45933f-2247-4fb7-a374-b54ac4e4dedd

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listfound in release: 3.0Found to occur in 3.0found in release: 3.1Found to occur in 3.1has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.platform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform teamwaiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions