registerFfmpegLicense function

void registerFfmpegLicense()

Registers the FFmpeg LGPL-2.1 attribution with LicenseRegistry.

Call this at startup gated on the generated kUxEnableFfmpeg constant (from app_info.g.dart, which the ux build_runner builder derives from the app's ux: enable_ffmpeg pubspec flag) — e.g. if (kUxEnableFfmpeg) registerFfmpegLicense();. That keeps pubspec the single source of truth, registers eagerly (the notice shows without playing a video), and needs no --dart-define. Idempotent — registers at most once.

Implementation

void registerFfmpegLicense() {
  if (_registered) return;
  _registered = true;
  LicenseRegistry.addLicense(_ffmpegLicenseEntries);
}