npaw_forge_better_player_plus 9.6.0
npaw_forge_better_player_plus: ^9.6.0 copied to clipboard
NPAW Forge adapter for the better_player_plus Flutter player: reports typed playback lifecycle plus track-level QoS (bitrate, rendition, fps) to the Forge core.
npaw_forge_better_player_plus #
NPAW Forge analytics adapter for the
better_player_plus Flutter
player. Reports the typed playback lifecycle and the track-level QoS exposed
by the better_player_plus event surface to the Forge core.
Usage #
import 'package:better_player_plus/better_player_plus.dart';
import 'package:npaw_forge/npaw_forge.dart';
import 'package:npaw_forge_better_player_plus/npaw_forge_better_player_plus.dart';
final forge = await NpawForge.start(
const ForgeConfig(accountCode: 'yourAccount', appName: 'yourApp'),
);
final controller = BetterPlayerController(
const BetterPlayerConfiguration(autoPlay: true),
);
final attachment = await attachBetterPlayer(
forge,
controller,
metadata: const ContentMetadata(title: 'Big Buck Bunny'),
);
await controller.setupDataSource(
BetterPlayerDataSource.network('https://example.com/stream.m3u8'),
);
// when playback ends for good:
await attachment.dispose();
QoS scope #
| Fact | Source | Notes |
|---|---|---|
| Playhead, duration, playrate | videoPlayerController.value |
null until the low-level controller exists |
| Live flag | controller.isLiveStream() |
declared on the data source; null before setup |
| Resource | betterPlayerDataSource.url |
yes |
| Bitrate | changedTrack event cache |
HLS/DASH tracks only; zeroed default track reads as null |
| Rendition (WxH) | changedTrack cache, decoded surface size fallback |
yes |
| Frames per second | changedTrack cache |
HLS/DASH tracks only |
| Video codec | changedTrack cache (codecs) |
as declared by the playlist |
| Subtitles | changedSubtitles event cache |
selected subtitle source name |
| Dropped frames, throughput | not exposed by better_player_plus | null |
better_player_plus posts a discrete seekTo event but no seek-completion
event, so seeks are closed on the next progress tick. Exceptions carry no
severity signal and are reported fatal, deduplicated by message.