youtube_shorts
4.0.2, released 3 years ago by an unverified publisher
A vertical YouTube shorts video player widget.
What it does
Provides a vertical TikTok/Shorts style video feed playing YouTube shorts using a list of URLs or channel names. Includes support for inline ads, custom overlays, loading states, and media controls.
AI-written summary of version 4.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to build a YouTube Shorts or vertical video feed in your app
- You need to display shorts from specific YouTube channels or a list of video URLs
Skip it when
- You need standard horizontal video playback or full-featured YouTube embedding
- You cannot use media_kit native dependencies
Strengths
- Supports multiple content sources including URL lists, single channels, and multi-channels
- Includes features for ads integration, custom overlays, and error widgets
Weaknesses
- Relies on media_kit which requires platform-specific native setup and permissions
- Dependent on web scraping and YouTube internal APIs which can be fragile
Setup
- Kind
- Flutter widgets
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 15
Requires media_kit native configurations, calling MediaKit.ensureInitialized(), and handling runtime storage/video permissions.
late final ShortsController controller;
@override
void initState() {
super.initState();
controller = ShortsController(
youtubeVideoInfoService: VideosSourceController.fromUrlList(
videoIds: [
'https://www.youtube.com/shorts/PiWJWfzVwjU',
'https://www.youtube.com/shorts/AeZ3dmC676c',
],
),
);
}
@override
Widget build(BuildContext context) {
return YoutubeShortsPage(
controller: controller,
);
}Alternatives
Packages that do the same job and could replace youtube_shorts.
- video_player_android
Android implementation of the video_player plugin
88Compare - video_player_avfoundation
iOS and macOS implementation of the video_player plugin
86Compare - youtube_player_iframe
Flutter widget for embedding YouTube videos via the official iFrame API
94Compare - video_player
Flutter plugin for displaying inline video on Android, iOS, macOS, and web.
93Compare
Works with
Packages commonly used together with youtube_shorts: ones it builds on, ones built on it, and its own family.
- xmlyoutube_shorts depends on itFull-featured XML and XPath library for DOM parsing, SAX streaming, and fluent building.
- json_annotationyoutube_shorts depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- htmlyoutube_shorts depends on itA Dart implementation of an HTML5 parser for strings and bytes.
- http_parseryoutube_shorts depends on itA platform-independent package for parsing and serializing HTTP formats.
- synchronizedyoutube_shorts depends on itLock mechanism to prevent concurrent access to asynchronous code.
- freezed_annotationyoutube_shorts depends on itAnnotations for the freezed code-generator.
- media_kityoutube_shorts depends on itCross‑platform video and audio player for Flutter and Dart
- media_kit_videoyoutube_shorts depends on itNative implementation for video playback in package:media_kit.