player_watermark 0.1.0
player_watermark: ^0.1.0 copied to clipboard
A zero-dependency Flutter widget that overlays a semi-transparent text watermark on any video player or widget. Designed for live playback — no FFmpeg, no file processing.
player_watermark
A zero-dependency Flutter widget that overlays a semi-transparent text watermark on any video player or widget in real time.
Overview #
player_watermark renders a live text label — username, email, user ID — over any Flutter widget without touching a video file. It is designed for video players, but works on any widget.
Unlike FFmpeg-based watermark packages that process and re-encode video files, player_watermark is a pure Flutter Stack overlay. There is no processing delay, no temporary files, and no platform channels.
Touch events pass through the watermark layer. The underlying player remains fully interactive.
Features #
| Live overlay | Renders over any widget at runtime — no file processing |
| Touch passthrough | IgnorePointer ensures the player stays fully interactive |
| 7 positions | Center, corners, and top/bottom center |
| Fully customizable | Opacity, font size, font weight, color, padding |
| Zero dependencies | Pure Flutter — no FFmpeg, no platform channels, no native code |
| All platforms | Android, iOS, Web, macOS, Windows, Linux |
Installation #
dependencies:
player_watermark: ^0.1.0
flutter pub get
Usage #
Basic #
import 'package:player_watermark/player_watermark.dart';
PlayerWatermark(
text: 'john@example.com',
child: VideoPlayer(controller),
)
Custom position and style #
PlayerWatermark(
text: 'john@example.com',
opacity: 0.15,
fontSize: 32,
color: Colors.white,
position: WatermarkPosition.bottomRight,
padding: const EdgeInsets.all(12),
child: VideoPlayer(controller),
)
With any player package #
player_watermark wraps the player widget — it is compatible with any video player:
// video_player
PlayerWatermark(text: username, child: VideoPlayer(controller));
// chewie
PlayerWatermark(text: username, child: Chewie(controller: chewieController));
// better_player_plus
PlayerWatermark(text: username, child: BetterPlayer(controller: betterPlayerController));
// youtube_player_flutter
PlayerWatermark(text: username, child: YoutubePlayer(controller: ytController));
API Reference #
PlayerWatermark #
class PlayerWatermark extends StatelessWidget
| Parameter | Type | Default | Description |
|---|---|---|---|
text |
String |
required | The watermark label — username, email, or user ID |
child |
Widget |
required | The widget the watermark is applied to |
opacity |
double |
0.12 |
Opacity of the watermark text (0.0–1.0) |
fontSize |
double |
48.0 |
Font size of the watermark text |
fontWeight |
FontWeight |
bold |
Font weight of the watermark text |
color |
Color |
Colors.black |
Text color before opacity is applied |
position |
WatermarkPosition |
center |
Where the watermark appears over the child |
padding |
EdgeInsets |
EdgeInsets.all(16) |
Padding when position is not center |
enabled |
bool |
true |
Toggle watermark visibility without rebuilding the child |
WatermarkPosition #
enum WatermarkPosition {
center,
topLeft,
topCenter,
topRight,
bottomLeft,
bottomCenter,
bottomRight,
}
Comparison #
player_watermark |
video_watermark / video_watermark_plus |
secure_watermark |
|
|---|---|---|---|
| Live overlay (no file processing) | |||
| Works on video players | |||
| Single centered label | |||
| Tiled repeating pattern | |||
| Zero dependencies | |||
| Touch passthrough | |||
| All platforms |
Use Cases #
- E-learning platforms — overlay the student's username on lecture videos to deter screen recording sharing
- DRM content — identify the source of leaked recordings by embedding user identity
- Banking and fintech — watermark sensitive screens with user ID
- Enterprise — mark confidential document viewers and dashboards
Contributing #
Contributions, issues, and feature requests are welcome. Please open an issue on GitHub before submitting a pull request.
License #
Distributed under the MIT License. See LICENSE for details.
Copyright © 2026 Amr Sabbagh