Skip to content

Allow the creation of Image from an html.MediaElement / html.Image #123275

@jezell

Description

@jezell

Skia has support for creating an Image from a media element, but this is not currently exposed by Flutter. There are many cases such as SVG rendering, Video playback, or 3D rendering where many WebGL frameworks allow creation of textures from Media elements because it's the only relatively efficient pathway that the browser offers for doing this.

As it looks like the Texture support for Flutter web has been put on hold (#37890), perhaps an easier low hanging fruit would be to expose a helper method to do this.

We need a way to stop the renderer from crashing on web due to WebGL context limits being exhausted, but currently have no good pathway to prevent their creation. We love flutter, but the WebGL context problem is real and we really need to figure out a way to render things into layers of the canvas without forcing new contexts to be created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: imagesLoading, displaying, rendering imagesc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterplatform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions