subtitle_wrapper_package 2.1.0 icon indicating copy to clipboard operation
subtitle_wrapper_package: ^2.1.0 copied to clipboard

A Subtitle Wrapper package, this subtitle wrapper package displays subtitles for a video player.

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.

Parse WebVTTParsing of WebVtt subtitles.
Parse SubRip (.srt)Parsing of SubRip subtitles.
Remote loading utf8 encoded subtitlesThe parsing of subtitle files with the utf8 encoding from an url.
Remote loading latin1 encoded subtitlesThe parsing of subtitle files with the latin1 encoding from an url.
Dynamic updating of subtitleUpdate subtitle content during playback.
Standard subtitle stylingStandard styling of subtitle items.
Advance subtitle stylingAdvance 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 🎉

 final SubtitleController subtitleController = SubtitleController(
    subtitleUrl: "",
    subtitleType: SubtitleType.webvtt,
       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 #


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]

pub points


verified publisher

A Subtitle Wrapper package, this subtitle wrapper package displays subtitles for a video player.

Repository (GitHub)


API reference


Icon for licenses.MIT (LICENSE)


bloc, equatable, flutter, flutter_bloc, http, http_parser, video_player


Packages that depend on subtitle_wrapper_package