import 'package:nut_player_platform_interface/nut_player_platform_interface.dart' show NutPlayerPlatform;

// Активная платформа плеера (android, ios, web)
NutPlayerPlatform? _lastNutPlayerPlatform;
NutPlayerPlatform get nutPlayerPlatform {
  final NutPlayerPlatform currentInstance = NutPlayerPlatform.instance;
  if (_lastNutPlayerPlatform != currentInstance) {
    // This will clear all open videos on the platform when a full restart is
    // performed.
    currentInstance.init();
    _lastNutPlayerPlatform = currentInstance;
  }
  return currentInstance;
}