dannyglover / audiotags

Read and write audio metadata in Flutter. Supports multiple formats.

Home Page:https://pub.dev/packages/audiotags

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AudioTags

Read and write audio metadata in Flutter. Supports multiple formats.

Usage

Read

Tag? tag = await AudioTags.read(path);

String? title = tag?.title;
String? artist = tag?.artist;
String? album = tag?.album;
String? genre = tag?.genre;
int? year = tag?.year;
int? trackNumber = tag?.trackNumber;
int? trackTotal = tag?.trackTotal;
int? duration = tag?.duration;
List<Picture>? pictures = tag?.pictures;

Write

Tag tag = Tag(
    title: "Title",
    artist: "Artist",
    album: "Album",
    genre: "Genre",
    year: 2000,
    trackNumber: 1,
    trackTotal: 2,
    pictures: [
        Picture(
            bytes: Uint8List.fromList([0, 0, 0, 0]),
            mimeType: MimeType.none,
            pictureType: PictureType.other
        )
    ]
);

AudioTags.write(path, tag);

Supported Formats

This plugin uses a Rust crate called lofty to write and read metadata.

The supported formats are listed here.

About

Read and write audio metadata in Flutter. Supports multiple formats.

https://pub.dev/packages/audiotags

License:MIT License


Languages

Language:Dart 28.0%Language:Rust 17.7%Language:C++ 16.8%Language:CMake 15.1%Language:Python 9.9%Language:C 6.6%Language:Ruby 2.9%Language:Swift 1.6%Language:Kotlin 0.9%Language:Objective-C 0.5%