搜尋套件、儲存庫與 APP 分類

套件詳情v1.0.3

m3u

一個簡單的 Dart 工具,可從字串或文件字串中解析 M3U 和 M3U_Plus 檔案。

近 30 天下載
24
喜歡數
12
Pub 分數
35

安裝套件

flutter pub add m3u

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

m3u 套件是一個輕量級的 Dart 工具,專門用於從字串或文件輸入中解析 M3U 與 M3U_Plus 播放清單檔案。它讓開發者能輕鬆從標準 M3U 格式中提取元資料與媒體 URL,支援基本與擴展的播放清單結構。適用於處理音訊或視訊串流播放清單的應用程式,提供簡單的解析功能且無需外部相依性。此工具在需要動態播放清單管理的多媒體應用中特別實用。

適用情境

  • 解析即時串流播放清單
  • 從 M3U 檔案中提取媒體 URL
  • 建構媒體播放器應用程式
  • 處理 IPTV 頻道列表
  • 轉換播放列表資料以供顯示
  • 支援離線播放列表儲存

主要特色

  • 基於字串的簡單解析
  • 支援 M3U 和 M3U_Plus 格式
  • 無外部依賴
  • 輕便且快速
  • 處理元數據標籤
  • 返回結構化的播放列表資料

適合對象

  • 媒體播放器應用
  • IPTV 客戶端
  • 串流媒體服務整合
  • 播放清單匯入/匯出工具
  • 基於 Dart 的多媒體工具

使用建議

  • 不支援直接的檔案 I/O
  • 僅限文字輸入解析
  • 播放清單完整性未驗證
  • 不適用於大規模播放清單處理
  • 不支援對損壞檔案的內建錯誤恢復

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

M3U format parser

Simple parser for M3U and M3U_Plus files.

How to use

Currently the parser only supports full file parsing.

import 'package:m3u/m3u.dart';

main() async {
  String playlistContent = <load_playlist>;
  final playlist = await M3uParser.parse(file);
  
  // Organized categories
  final categories =
      sortedCategories(entries: listOfTracks, attributeName: 'group-title');
  print(categories);
}

Missing features

  • [ ] Parse from a stream of data instead of a string
  • [ ] Parse info from the header
  • [ ] Parse start track info
  • [ ] Parse non string information ex: aspect-ratio=4:3

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。