FLUTTER ECOSYSTEM

erikas-taroza/audiotags

在Flutter中讀取和寫入音訊元資料。支援多種格式。

audiotags 專案封面
Stars
20
Forks
17
最近推送(UTC)
2025年6月12日
專案狀態
未封存
Erikas Taroza GitHub avatar
GITHUB User

Erikas Taroza ↗

語言DartRustCMakeC++RubyShellCBatchfileSwiftKotlinPowerShellObjective-C

此儲存庫發佈的套件

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

AudioTags

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

Usage

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

String? title = tag?.title;
String? trackArtist = tag?.trackArtist;
String? album = tag?.album;
String? albumArtist = tag?.albumArtist;
String? genre = tag?.genre;
int? year = tag?.year;
int? trackNumber = tag?.trackNumber;
int? trackTotal = tag?.trackTotal;
int? discNumber = tag?.discNumber;
int? discTotal = tag?.discTotal;
int? duration = tag?.duration;
List<Picture>? pictures = tag?.pictures;
Write
Tag tag = Tag(
    title: "Title",
    trackArtist: "Track Artist",
    album: "Album",
    albumArtist: "Album Artist",
    genre: "Genre",
    year: 2000,
    trackNumber: 1,
    trackTotal: 2,
    discNumber: 1,
    discTotal: 3,
    pictures: [
        Picture(
            bytes: Uint8List.fromList([0, 0, 0, 0]),
            mimeType: null,
            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.