Skip to content

[video_player ] Ability to play local mp3 audio files. #38480

@Sun3

Description

@Sun3

Use case

When you try to load a local asset audio file you receive an error that the File is not Found.

Code:

    _controller = VideoPlayerController.asset('assets/audios/angelus.mp3')
      ..initialize().then((_) {
        print('VALUE');
      setState(() {});
    });

Error:

E/ExoPlayerImplInternal(22088): Source error.
E/ExoPlayerImplInternal(22088): com.google.android.exoplayer2.upstream.AssetDataSource$AssetDataSourceException: java.io.FileNotFoundException: flutter_assets/assets/audios/angelus.mp3

Proposal

I would like to request the ability to play local audio files from the Flutter assets folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    p: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions