搜索插件、代码仓与 APP 分类

GitHub 代码仓Joran-Dob/flutter_subtitle_wrapper

flutter_subtitle_wrapper

这是一个用于 Flutter 视频播放器的字幕包。

flutter_subtitle_wrapper 项目封面
星标
37
复刻
65
最近推送(UTC)
2024年8月8日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

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]

Joran Dob GitHub avatar
GitHub 作者

Joran Dob ↗

I am an app and web developer living in Uppsala.

@doordashSweden官方网站 ↗
语言DartRubySwiftHTMLKotlinObjective-C

分类

此仓库发布的插件

使用的依赖

依赖清单 11 项

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗