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

套件詳情v2.2.1

subtitle_wrapper_package

一個字幕包裝器套件,此字幕包裝器套件用於影片播放器顯示字幕。

AndroidiOSmacOS
近 30 天下載
859
喜歡數
79
Pub 分數
140

安裝套件

flutter pub add subtitle_wrapper_package

套件介紹

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

subtitle_wrapper_package 是一個 Flutter 外掛程式,專門用於為影片播放器顯示字幕。它與 Flutter 的影片播放功能無縫整合,讓開發者能夠呈現與影片內容同步的時間文字覆疊層。此套件支援多種字幕格式,並提供乾淨、可自訂的介面來顯示字幕。專為跨平台使用設計,可在 Android、iOS 和 macOS 上運作,非常適合需要可存取且精確字幕渲染的多媒體應用。

適用情境

  • 影片播放帶字幕
  • 多語言視頻應用
  • 媒體播放器中的可存取性功能
  • 教育視頻平台
  • 即時串流字幕

主要特色

  • 定時字幕同步
  • 支援多種字幕格式
  • 跨平台相容性
  • 可自訂字幕樣式
  • 與影片播放器輕鬆整合

適合對象

  • 開發影片應用的開發者
  • 需要輔助功能支援的應用程式
  • 教育或語言學習平台
  • 媒體串流服務

使用建議

  • 需要相容的影片播放器設定
  • 字幕檔案格式必須受支援
  • 僅限基本字幕渲染,不支援進階編輯

原始 README

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

subtitle_wrapper_package

Test and (dry-run) publish package

codecov licence

Features

Subtitle playback for the 2 most widely used subtitle formats are supported currently which can be dynamically updated during playback from a url of content string. As well as basic styling of the subtitle text item.

The package is nearly completely unit tested and widget tests are in progress.

Function Description Implemented
Parse WebVTT Parsing of WebVtt subtitles. ✔
Parse SubRip (.srt) Parsing of SubRip subtitles. ✔
Remote loading utf8 encoded subtitles The parsing of subtitle files with the utf8 encoding from an url. ✔
Remote loading latin1 encoded subtitles The parsing of subtitle files with the latin1 encoding from an url. ✔
Dynamic updating of subtitle Update subtitle content during playback. ✔
Standard subtitle styling Standard styling of subtitle items. ✔
Advance subtitle styling Advance styling of subtitle items. Like custom fonts. ✔

Installation

The basic setup of the package is really straight forward, create a instance of SubtitleController with a subtitleUrl or subtitlesContent depending if your resource is remote or local.

Unfortunately currently its required to specify the subtitle type so webvtt or srt .

After this you need to wrap your video player with the SubTitleWrapper and add the SubtitleController and videoPlayerController to the SubTitleWrapper . That's it :tada:

 final SubtitleController subtitleController = SubtitleController(
    subtitleUrl: "https://pastebin.com/raw/ZWWAL7fK",
    subtitleType: SubtitleType.webvtt,
  );
  
 SubtitleWrapper(
       videoPlayerController: videoPlayerController,
       subtitleController: subtitleController,
       subtitleStyle: SubtitleStyle(
         textColor: Colors.white,
         hasBorder: true,
       ),
       videoChild: Chewie(
         controller: chewieController,
       ),
	),

Example

Demonstrates how to use the subtitle_wrapper_package plugin.

See the example documentation for more information.

Changelog

See CHANGELOG.md.

Contributing

Feel free to contribute by opening issues and/or pull requests. Your feedback is very welcome!

License

MIT License

Copyright (c) [2019] [Joran Dob]

所屬分類

依賴

依賴清單 6 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。