Skip to content

[Web]Cannot play recorded videos using camera with video player plugin #100257

@Alvarocda

Description

@Alvarocda

I am trying to record and reproduce the recorded video on Flutter Web

I I'm recording videos using the camera plugin.
After finishing recording the video, the plugin returns me a url of type blob.
With the blob url, I'm trying to play the recorded video using the video_player plugin.

But when trying to initialize VideoPlayerController, the following error appears on my console.

Error: Unsupported operation: Infinity
    at Object.throw_ [as throw] (http://localhost:45721/dart_sdk.js:5067:11)
    at Number.[dartx.round] (http://localhost:45721/dart_sdk.js:17853:17)
    at video_player_web._VideoPlayer.new.sendInitialized (http://localhost:45721/packages/video_player_web/video_player_web.dart.lib.js:370:247)
    at http://localhost:45721/packages/video_player_web/video_player_web.dart.lib.js:312:16
    at Object._checkAndCall (http://localhost:45721/dart_sdk.js:5274:16)
    at Object.dcall (http://localhost:45721/dart_sdk.js:5279:17)
    at HTMLVideoElement.<anonymous> (http://localhost:45721/dart_sdk.js:109327:100)

flutter doctor -v output

[✓] Flutter (Channel stable, 2.10.3, on Linux Mint 20.2 5.13.0-35-generic, locale pt_BR.UTF-8)
    • Flutter version 2.10.3 at /mnt/Arquivos/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (2 weeks ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /mnt/Arquivos/Android/Sdk
    • Platform android-31, build-tools 31.0.0
    • ANDROID_HOME = /mnt/Arquivos/Android/Sdk
    • Java binary at: /mnt/Arquivos/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2020.3)
    • Android Studio at /mnt/Arquivos/android-studio
    • Flutter plugin version 63.2.1
    • Dart plugin version 203.8452
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] IntelliJ IDEA Community Edition (version 2021.3)
    • IntelliJ at /mnt/Arquivos/idea-IC-212.5457.46
    • Flutter plugin version 65.2.4
    • Dart plugin version 213.7227

[✓] VS Code (version 1.65.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.36.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Linux Mint 20.2 5.13.0-35-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 99.0.4844.74

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listassigned for triageissue is assigned to a domain expert for further triagebrowser: chrome-androidonly manifests in Chrome on Androidbrowser: chrome-desktoponly manifests in desktop Chromefound in release: 2.10Found to occur in 2.10found in release: 2.13Found to occur in 2.13has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: cameraThe camera pluginp: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.platform-webWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionwaiting 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