{"id":15008419,"url":"https://github.com/crazelu/subtitle_player","last_synced_at":"2025-04-09T16:04:40.030Z","repository":{"id":233202306,"uuid":"786270180","full_name":"Crazelu/subtitle_player","owner":"Crazelu","description":"A Flutter package for synchronizing subtitles with video and audio playback.","archived":false,"fork":false,"pushed_at":"2025-03-28T14:11:50.000Z","size":23459,"stargazers_count":29,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T16:04:30.036Z","etag":null,"topics":["dart","dartlang","flutter","lrc","lrc-parser","srt-subtitles","subrip","subtitle-conversion","subtitles","subtitles-parsing","webvtt","webvtt-parser"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Crazelu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-13T23:52:49.000Z","updated_at":"2025-03-28T16:31:18.000Z","dependencies_parsed_at":"2024-04-19T11:15:34.546Z","dependency_job_id":null,"html_url":"https://github.com/Crazelu/subtitle_player","commit_stats":null,"previous_names":["crazelu/subtitle_player"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crazelu%2Fsubtitle_player","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crazelu%2Fsubtitle_player/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crazelu%2Fsubtitle_player/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Crazelu%2Fsubtitle_player/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Crazelu","download_url":"https://codeload.github.com/Crazelu/subtitle_player/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065290,"owners_count":21041871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","dartlang","flutter","lrc","lrc-parser","srt-subtitles","subrip","subtitle-conversion","subtitles","subtitles-parsing","webvtt","webvtt-parser"],"created_at":"2024-09-24T19:18:36.652Z","updated_at":"2025-04-09T16:04:40.007Z","avatar_url":"https://github.com/Crazelu.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Subtitle Player\nA Flutter package for synchronizing subtitles with video and audio playback.\n\n## Features 📦\n\n- [x] Load SubRip, WebVTT and LRC subtitles\n- [x] Play, pause and seek support\n- [x] Adjust playback speed\n\n## Install 🚀\n\nIn the `pubspec.yaml` of your flutter project, add the `subtitle_player` dependency:\n\n```yaml\ndependencies:\n    subtitle_player:\n        git:\n            url: https://github.com/Crazelu/subtitle_player.git\n```\n\n## Import the package in your project 📥\n\n```dart\nimport 'package:subtitle_player/subtitle_player.dart';\n```\n\n## Usage 🏗️\n\nCreate a `SubtitleController` and load a subtitle file\n\n```dart\nfinal subtitleController = SubtitleController();\nsubtitleController.loadSubtitle(Subtitle.fromWebVTT(content));\n```\n\nStart playing subtitle with your audio/video\n\n```dart\nsubtitleController.play();\n```\n\nSubscribe to `SubtitleController` for changes using `ValuelistenableBuilder`, `ListenableBuilder` or `AnimatedBuilder`\n\n```dart\n// From the video player example\n\n Align(\n    alignment: Alignment.bottomCenter,\n    child: ValueListenableBuilder\u003cSubtitlePlayerValue\u003e(\n        valueListenable: _subtitleController,\n        builder: (context, subtitleValue, _) {\n        if (subtitleValue.currentSubtitle.isEmpty) {\n            return const SizedBox.shrink();\n        }\n        return Container(\n            constraints: BoxConstraints(\n                maxWidth: (MediaQuery.sizeOf(context).height *\n                        _controller.value.aspectRatio) *\n                    0.5),\n            padding: const EdgeInsets.all(4),\n            margin: const EdgeInsets.only(bottom: 8),\n            decoration: BoxDecoration(\n            borderRadius: BorderRadius.circular(4),\n            color: Colors.black.withOpacity(0.65),\n            ),\n            child: Text(\n            subtitleValue.currentSubtitle,\n            textAlign: TextAlign.center,\n            style: const TextStyle(\n                fontSize: 12,\n                color: Colors.white,\n                    ),\n                ),\n            );\n        },\n    ),\n)\n```\n\nCheck the [example project](https://github.com/Crazelu/subtitle_player/tree/main/example) for more detailed usage examples both for video and audio playing.\n\n## Demo 📷\n\n\u003cimg src=\"https://raw.githubusercontent.com/Crazelu/subtitle_player/main/demos/video-player-demo.gif\" width=\"280\" alt=\"Example video subtitle demo\"\u003e \u003cimg src=\"https://raw.githubusercontent.com/Crazelu/subtitle_player/main/demos/audio-player-demo.gif\" width=\"280\" alt=\"Example live lyrics demo\"\u003e\n\n## Contributions 🫱🏾‍🫲🏼\n\nFeel free to contribute to this project.\n\nIf you find a bug or want a feature, but don't know how to fix/implement it, please fill an [issue](https://github.com/Crazelu/subtitle_player/issues).  \nIf you fixed a bug or implemented a feature, please send a [pull request](https://github.com/Crazelu/subtitle_player/pulls).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazelu%2Fsubtitle_player","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrazelu%2Fsubtitle_player","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrazelu%2Fsubtitle_player/lists"}