import 'news_video_source_stub.dart'
    if (dart.library.io) 'news_video_source_native.dart'
    if (dart.library.html) 'news_video_source_web.dart' as platform;

/// Prepares a streamable source on each platform. Web fetches protected media
/// with the app's auth headers and then plays a short-lived local Blob URL.
Future<Map<String, Object>> prepareNewsVideoSource(
  String url,
  Map<String, String> headers,
) => platform.prepareNewsVideoSource(url, headers);

/// Releases temporary browser media URLs after the player is disposed.
void releaseNewsVideoSource(String? url) => platform.releaseNewsVideoSource(url);
