[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9263":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":16,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},9263,"chewie","fluttercommunity\u002Fchewie","fluttercommunity","The video player for Flutter with a heart of gold",null,"Dart",2058,1076,25,406,0,1,4,31.1,"MIT License",false,"master",true,[24,25],"flutter","video-player","2026-06-12 02:02:05","# chewie\n\n[![Flutter Community: chewie](https:\u002F\u002Ffluttercommunity.dev\u002F_github\u002Fheader\u002Fchewie)](https:\u002F\u002Fgithub.com\u002Ffluttercommunity\u002Fcommunity)\n\n[![Version](https:\u002F\u002Fimg.shields.io\u002Fpub\u002Fv\u002Fchewie.svg)](https:\u002F\u002Fpub.dev\u002Fpackages\u002Fchewie)\n![CI](https:\u002F\u002Fgithub.com\u002Fbrianegan\u002Fchewie\u002Fworkflows\u002FCI\u002Fbadge.svg)\n[![Generic badge](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-android%20|%20ios%20|%20web%20-blue.svg)](https:\u002F\u002Fpub.dev\u002Fpackages\u002Fchewie)\n\nThe video player for Flutter with a heart of gold. \n\nThe [`video_player`](https:\u002F\u002Fpub.dartlang.org\u002Fpackages\u002Fvideo_player) plugin provides low-level \naccess to video playback. \n\nChewie uses the `video_player` under the hood and wraps it in a friendly Material or Cupertino UI!\n\n## Table of Contents\n1.  🚨 [IMPORTANT!!! (READ THIS FIRST)](#-important-read-this-first)\n2.  🔀 [Flutter Version Compatibility](#-flutter-version-compatibility)\n3.  🖼️ [Preview](#%EF%B8%8F-preview)\n4.  ⬇️ [Installation](#%EF%B8%8F-installation)\n5.  🕹️ [Using it](#%EF%B8%8F-using-it)\n6.  ⚙️ [Options](#%EF%B8%8F-options)\n7.  🔡 [Subtitles](#-subtitles)\n8.  🧪 [Example](#-example)\n9.  ⏪ [Migrating from Chewie \u003C 0.9.0](#-migrating-from-chewie--090)\n10. 🗺️ [Roadmap](#%EF%B8%8F-roadmap)\n11. ⚠️ [Android warning](#%EF%B8%8F-android-warning)\n12. 📱 [iOS warning](#-ios-warning)\n\n\n## 🚨 IMPORTANT!!! (READ THIS FIRST)\nThis library is __NOT__ responsible for any issues caused by `video_player`, since it's merely a UI \nlayer on top of it. \n\nIn other words, if you see any `PlatformException`s being thrown in your app due to video playback,\nthey are exclusive to the `video_player` library. \n\nInstead, please raise an issue related to it with the [Flutter Team](https:\u002F\u002Fgithub.com\u002Fflutter\u002Fflutter\u002Fissues\u002Fnew\u002Fchoose).\n\n## 🔀 Flutter Version Compatibility\n\nThis library will at the very least make a solid effort to support the second most recent version \nof Flutter released. In other words, it will adopt `N-1` version support at\nthe bare minimum.\n\nHowever, this cannot be guaranteed either due to major changes between Flutter versions or \nthis library's dependencies. Should that occur, future updates will be released as major or minor \nversions as needed.\n\n## 🖼️ Preview\n\n|                                MaterialControls                                 |                                MaterialDesktopControls                                 |\n|:-------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------:|\n| ![](https:\u002F\u002Fgithub.com\u002Fbrianegan\u002Fchewie\u002Fraw\u002Fmaster\u002Fassets\u002FMaterialControls.png) | ![](https:\u002F\u002Fgithub.com\u002Fbrianegan\u002Fchewie\u002Fraw\u002Fmaster\u002Fassets\u002FMaterialDesktopControls.png) |\n\n### CupertinoControls\n![](https:\u002F\u002Fgithub.com\u002Fbrianegan\u002Fchewie\u002Fraw\u002Fmaster\u002Fassets\u002FCupertinoControls.png)\n\n## ⬇️ Installation\n\nIn your `pubspec.yaml` file within your Flutter Project add `chewie` and `video_player` under dependencies:\n\n```yaml\ndependencies:\n  chewie: \u003Clatest_version>\n  video_player: \u003Clatest_version>\n```\n\n## 🕹️ Using it\n\n```dart\nimport 'package:chewie\u002Fchewie.dart';\nimport 'package:video_player\u002Fvideo_player.dart';\n\nfinal videoPlayerController = VideoPlayerController.networkUrl(Uri.parse(\n    'https:\u002F\u002Fflutter.github.io\u002Fassets-for-api-docs\u002Fassets\u002Fvideos\u002Fbutterfly.mp4'));\n\nawait videoPlayerController.initialize();\n\nfinal chewieController = ChewieController(\n  videoPlayerController: videoPlayerController,\n  autoPlay: true,\n  looping: true,\n);\n\nfinal playerWidget = Chewie(\n  controller: chewieController,\n);\n```\n\nPlease make sure to dispose both controller widgets after use. For example, by overriding the dispose method of the a `StatefulWidget`:\n```dart\n@override\nvoid dispose() {\n  videoPlayerController.dispose();\n  chewieController.dispose();\n  super.dispose();\n}\n```\n\n## ⚙️ Options\n\n![](https:\u002F\u002Fgithub.com\u002Fbrianegan\u002Fchewie\u002Fraw\u002Fmaster\u002Fassets\u002FOptions.png)\n\nChewie has some options which control the video. These options appear by default in a `showModalBottomSheet` (similar to YT). By default, Chewie passes  `Playback speed` and `Subtitles` options as an `OptionItem`.\n\nTo add additional options, just add these lines to your `ChewieController`:\n\n```dart\nadditionalOptions: (context) {\n  return \u003COptionItem>[\n    OptionItem(\n      onTap: () => debugPrint('My option works!'),\n      iconData: Icons.chat,\n      title: 'My localized title',\n    ),\n    OptionItem(\n      onTap: () =>\n          debugPrint('Another option that works!'),\n      iconData: Icons.chat,\n      title: 'Another localized title',\n    ),\n  ];\n},\n```\n\n### Customizing the modal sheet\n\nIf you don't like the default `showModalBottomSheet` for showing your options, you can override the View with the `optionsBuilder` method:\n\n```dart\noptionsBuilder: (context, defaultOptions) async {\n  await showDialog\u003Cvoid>(\n    context: context,\n    builder: (ctx) {\n      return AlertDialog(\n        content: ListView.builder(\n          itemCount: defaultOptions.length,\n          itemBuilder: (_, i) => ActionChip(\n            label: Text(defaultOptions[i].title),\n            onPressed: () =>\n                defaultOptions[i].onTap!(),\n          ),\n        ),\n      );\n    },\n  );\n},\n```\n\nYour `additionalOptions` are already included here (if you provided `additionalOptions`)!\n\n### Translations\n\nWhat is an option without proper translation? \n\nTo add your translation strings add:\n\n```dart\noptionsTranslation: OptionsTranslation(\n  playbackSpeedButtonText: 'Wiedergabegeschwindigkeit',\n  subtitlesButtonText: 'Untertitel',\n  cancelButtonText: 'Abbrechen',\n),\n```\n\n## 🔡 Subtitles\n\n> Since version 1.1.0, Chewie supports subtitles.\n\nChewie allows you to enhance the video playback experience with text overlays. You can add a `List\u003CSubtitle>` to your `ChewieController` and fully customize their appearance using the `subtitleBuilder` function.\n\n### Showing Subtitles by Default\n\nChewie provides the `showSubtitles` flag, allowing you to control whether subtitles are displayed automatically when the video starts. By default, this flag is set to `false`.\n\n### Adding Subtitles\n\nHere’s an example of how to add subtitles to your `ChewieController`:\n\n```dart\nChewieController(\n  videoPlayerController: _videoPlayerController,\n  autoPlay: true,\n  looping: true,\n  subtitle: Subtitles([\n    Subtitle(\n      index: 0,\n      start: Duration.zero,\n      end: const Duration(seconds: 10),\n      text: 'Hello from subtitles',\n    ),\n    Subtitle(\n      index: 1,\n      start: const Duration(seconds: 10),\n      end: const Duration(seconds: 20),\n      text: 'What’s up? :)',\n    ),\n  ]),\n  showSubtitles: true, \u002F\u002F Automatically display subtitles\n  subtitleBuilder: (context, subtitle) => Container(\n    padding: const EdgeInsets.all(10.0),\n    child: Text(\n      subtitle,\n      style: const TextStyle(color: Colors.white),\n    ),\n  ),\n);\n```\n\n### Subtitle Structure\n\nThe `Subtitle` model contains the following key attributes:\n\n- **`index`**: A unique identifier for the subtitle, useful for database integration.\n- **`start`**: The starting point of the subtitle, defined as a `Duration`.\n- **`end`**: The ending point of the subtitle, defined as a `Duration`.\n- **`text`**: The subtitle text that will be displayed.\n\nFor example, if your video is 10 minutes long and you want to add a subtitle that appears between `00:00` and `00:10`, you can define it like this:\n\n```dart\nSubtitle(\n  index: 0,\n  start: Duration.zero,\n  end: const Duration(seconds: 10),\n  text: 'Hello from subtitles',\n),\n```\n\n### Customizing Subtitles\n\nUse the `subtitleBuilder` function to customize how subtitles are rendered, allowing you to modify text styles, add padding, or apply other customizations to your subtitles.\n\n## 🧪 Example\n\nPlease run the app in the [`example\u002F`](https:\u002F\u002Fgithub.com\u002Fbrianegan\u002Fchewie\u002Ftree\u002Fmaster\u002Fexample) folder to start playing!\n\n## ⏪ Migrating from Chewie \u003C 0.9.0\n\nInstead of passing the `VideoPlayerController` and your options to the `Chewie` widget you now pass them to the `ChewieController` and pass that later to the `Chewie` widget.\n\n```dart\nfinal playerWidget = Chewie(\n  videoPlayerController,\n  autoPlay: true,\n  looping: true,\n);\n```\n\nbecomes\n\n```dart\nfinal chewieController = ChewieController(\n  videoPlayerController: videoPlayerController,\n  autoPlay: true,\n  looping: true,\n);\n\nfinal playerWidget = Chewie(\n  controller: chewieController,\n);\n```\n\n## 🗺️ Roadmap\n\n- [x] MaterialUI\n- [x] MaterialDesktopUI\n- [x] CupertinoUI\n- [x] Options with translations\n- [x] Subtitles\n- [x] CustomControls\n- [x] Auto-Rotate on FullScreen depending on Source Aspect-Ratio\n- [x] Live-Stream and UI\n- [x] AutoPlay\n- [x] Placeholder\n- [x] Looping\n- [x] Start video at\n- [x] Custom Progress-Bar colors\n- [x] Custom Overlay\n- [x] Allow Sleep (Wakelock)\n- [x] Playbackspeed Control \n- [x] Custom Route-Pagebuilder\n- [x] Custom Device-Orientation and SystemOverlay before and after fullscreen\n- [x] Custom ErrorBuilder\n- [ ] Support different resolutions of video\n- [ ] Re-design State-Manager with Provider\n- [ ] Screen-Mirroring \u002F Casting (Google Chromecast)\n\n\n## ⚠️ Android warning\n\nThere is an open [issue](https:\u002F\u002Fgithub.com\u002Fflutter\u002Fflutter\u002Fissues\u002F165149) that the buffering state of a video is not reported correctly. With this, the loading state is always triggered, hiding controls to play, pause or seek the video. A workaround was implemented until this is fixed, however it can't be perfect and still hides controls if seeking backwards while the video is paused, as a result of lack of correct buffering information (see #912).\n\nAdd the following to partly fix this behavior:\n\n```dart\n  \u002F\u002F Your init code can be above\n  videoController.addListener(yourListeningMethod);\n\n  \u002F\u002F ...\n\n  bool wasPlayingBefore = false;\n  void yourListeningMethod() {\n    if (!videoController.value.isPlaying && !wasPlayingBefore) {\n      \u002F\u002F -> Workaround if seekTo another position while it was paused before.\n      \u002F\u002F    On Android this might lead to infinite loading, so just play the\n      \u002F\u002F    video again.\n      videoController.play();\n    }\n\n    wasPlayingBefore = videoController.value.isPlaying;\n\n  \u002F\u002F ...\n  }\n```\n\nYou can also disable the loading spinner entirely to fix this problem in a more _complete_ way, however will remove the loading indicator if a video is buffering.\n\n```dart\n_chewieController = ChewieController(\n  videoPlayerController: _videoPlayerController,\n  progressIndicatorDelay: Platform.isAndroid ? const Duration(days: 1) : null,\n);\n```\n\n## 📱 iOS warning \n\nThe video_player plugin used by chewie will only work in iOS simulators if you are on flutter 1.26.0 or above. You may need to switch to the beta channel `flutter channel beta`\nPlease refer to this [issue](https:\u002F\u002Fgithub.com\u002Fflutter\u002Fflutter\u002Fissues\u002F14647).\n\n\n\n```\n000000000000000KKKKKKKKKKKKXXXXXXXXXXXXXKKKKKKKKKKKKKKKKKKKKKKKKKKK00\n000000000000000KKKKKKKKKKKKKXXXXXXXXXXKKKKKKKKKKKKKKKKKKKKKKKKKKKKK00\n000000000000000KKKKKKKKKKKKKXXXXXXK0xdoddoclodxOKKKKKKKKKKKKKKKKKKK00\n00000000000000KKKKKKKKKKKKKKKK0xoc:;;,;,,,,''';cldxO0KKKKKKKKKKKKK000\n00000000000000KKKKKKKKKKKKKKx:'',,,'.,'...;,'''',;:clk0KKKKKKKKKKK000\n00000000000000KKKKKKKKKKKKd;'',,,;;;'.,..,c;;,;;;;;:;;d0KKKKKKKKKK000\n00000000000000KKKKKKKKKKx,',;:ccl;,c;';,,ol::coolc:;;,,x0KKKKKKKKK000\n00000000000000KKKKKKKKOl;:;:clllll;;o;;;cooclddclllllc::kKKKKKKKKK000\n00000000000000KKKKKK0o;:ccclccccooo:ooc:ddoddloddolc;;;:c0KKKKKKK0000\n00000000000000KKKKKOccodolccclllooddddddxdxddxkkkkxxo;'';d0KKKKKK0000\n00000000000000KKKKkcoddolllllclloodxxxxdddxdddxxxddool:'.;O0KKKKK0000\n00000000000000000xloollcccc:cclclodkkxxxdddxxxkkxdlllolc,,x0KKKKK0000\n0000000000000000xccllccccc:;,'',;:dxkxxddddxkkkxdollcc:cc;d0KKKKKK000\n000000000000000kcc:::cllol:'......odxxdoccldxxxdollllc:;;:d0KKKKK0000\n00000000000000klc;;;clcc::;'...';;;:cll..',cdddolccccccc;:x0KKKKK0000\n0000000000000kdl;:cclllclllc::;,;.'.''o;,,'.;ccoooollllc:;x0KKKKK0000\n000000000000kol;:;::coolcc:::,.....,..cd,....':lolclolllc;x0KKKK00000\n00000000000Odl;:'cllol;''',;;;;::''.',:doc;,',::looc:lcol:x0K00000000\n0000000000Oxl:c,:lolc,..',:clllollodoc;cllolccloolllcclollO0K00000000\n0000000000xllc,:lool:'.,...o.;llxdo:loc;;ccodlolodldllolld00K0K000000\n000000000Ooc::coooc,,.',;:lx,,...':;o;l;':o:oolccocdoldloO0000KK00000\n00000000kol:clllc;;,.;::;:clllllolxc;.:c':ocldlccl;clldox000000000000\n000000Odll:cccc;:;,';cllooodoollcloll;c:.:d:ooo;cl;oloddkO00000000000\n0000OOddOdll;c,;;,,;;:cldodddoxdoodlcc:.,ox:o:lllocdlodx00O0000000000\n000Oxdl:::ll,:,:;,';c,:oloddolkxddxolc.'coccocolcccoooc;oxO00KOOOO000\ndc;,'...';c,,:c:::'c:';cldoo;:odolxoc:.,o:oldlxol;lddl,.,lkO0KdlcckKO\n'.......,:''';cll:cc,,;:l:c,,;:oc;cdc,.;::dldoxd:ldol;,'..,:lo,,,,kOk\n.......';'.',:clcll,,;:l:;'..''c:,;cl'.';dxoooxlddl;',''..,,;'...,ool\n.......,,.'';;:cld;.;,do:..;:,':c',:c''';xxdldocol'..';,.......',;;,;\n.......'..'',,coxc'';:do'.clc:lco',o;',;cOxdol:cc:.....'..oxd;','.'..\n'.......''..,:cxl;';;cx:''cll:clc'cl',:l:ko:c..;c:..';...,KNNl;:;ll:'\n.......''...;,ooc,,,:od'.':cccdd,,l''cl:co;;,..;;'..','..;d0O,;;:XXXK\n............'cll;',,lo'.'.::codl,c..:c;doc.,:.',....'...'......'l0XKk\n'............c;;,':lc.'',.;ccol;:,.:c.:o,;'.;'......,...',,.'...'.,;;\n.............',;;,cc..;,'';:lc':;..c'.c:;.,......,'..'...'',:,,;;,...\n..............',,;:'.';,',:c;.;;..';..,;,.........''..'...'kko.,,....\n...............;,:'..;''';:,..;''.''..''............'...'.lK0c';;c;'.\n...............,,'...,.',;''...''....,......'............'dOx',;:dd,'\n..............',.....'.,;..'..',..........'..............';:;',,ldo.'\n.............'''.'.....,'..',','..'...''..'............'.......,dx'.'\n.......................,...';,'..'.....,.'.............''.'......'..'\n...........'......'...',..'';,'..'.....................',';,..'....'.\n```\n","chewie 是一个为 Flutter 应用程序设计的视频播放器，具有友好且美观的用户界面。它基于 `video_player` 插件构建，提供了一层 Material 或 Cupertino 风格的UI封装，使得开发者可以轻松地在不同平台上实现一致的视频播放体验。项目支持Android、iOS及Web平台，并允许自定义播放控制选项和字幕功能。适用于需要在Flutter应用中集成高质量视频播放功能的场景，如教育软件、新闻客户端或娱乐应用等。",2,"2026-06-11 03:21:55","top_language"]