About this project

Chewie is a Flutter video-player UI package built on top of the lower-level video_player plugin. Applications initialize and configure a VideoPlayerController, pass it to a ChewieController along with playback options, and then display a Chewie widget. The README emphasizes that Chewie is only the interface layer: playback failures and PlatformExceptions originating from video_player are outside its responsibility. Both controllers should be disposed after use. The package provides Material, Material desktop, and Cupertino control skins. Its documented features include autoplay, looping, configurable start positions, live-stream UI, placeholders, custom progress-bar colors, custom overlays, fullscreen route and orientation handling, system overlay management, wakelock/sleep control, custom error widgets, and custom controls. The options sheet normally exposes playback speed and subtitles, but applications can add localized OptionItem entries or replace the sheet entirely with optionsBuilder. The pauseOnBackgroundTap option toggles playback when the video area is tapped. Subtitles are supplied as a list of Subtitle objects with index, start, end, and text fields. They can be shown by default, styled with SubtitleStyle, or rendered completely through subtitleBuilder. Chewie can render common inline WebVTT/SubRip markup such as bold, italic, underline, and font color tags. Unsupported cue tags are removed while their text is kept, escapes are decoded, and parsing is intentionally lenient; markup rendering can be disabled. Chapters are provided as an ascending-time list of ChewieChapter objects, producing segmented progress bars with chapter titles during hover or scrubbing. Casting support supplies the cast button, device picker, casting overlay, local-to-remote handover, and control routing, but deliberately does not include a Cast SDK sender. Apps implement ChewieCastController for discovery, session state, and remote playback, and provide CastMedia with a URL reachable by the receiver. On connection, Chewie pauses local playback, loads the remote media at the current position, shows an overlay, and routes playback commands; disconnection reverses the process. The example includes a fake cast controller, and additional control-bar widgets can be added for cases such as an AirPlay route picker. The README lists Android, iOS, and web platform badges, includes an example application, documents migration from versions before 0.9.0, and notes platform caveats: an Android video_player buffering-state issue can hide controls and has only partial workarounds, while iOS simulator playback requires a sufficiently recent Flutter version.