Skip to content

[video_player_web] Support videos of infinite duration #90038

@bselwe

Description

@bselwe

Use case

Currently, there is no way to play videos of infinite duration (e.g. recorded with html.MediaRecorder, see Chromium issue) as the following error is thrown:

errors.dart:202 Uncaught Error: Unsupported operation: Infinity
    at Object.throw_ [as throw] (errors.dart:251)
    at Number.[dartx.round] (js_number.dart:109)
    at video_player_web._VideoPlayer.new.sendInitialized (video_player_web.dart:298)
    at video_player_web.dart:201
    at Object._checkAndCall (operations.dart:334)
    at Object.dcall (operations.dart:339)
    at HTMLVideoElement.<anonymous> (html_dart2js.dart:37308)

This is related to VideoPlayer.sendInitialized which expects a video duration to be a finite number here.

It would be nice to be able to play videos of infinite duration, for instance, a recorded camera stream with the camera plugin.

Proposal

One proposal for this issue may be found here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterp: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.platform-webWeb applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions