initialize method
Implementation
Future<void> initialize(
Map<String, VideoSource> sources, {
bool autoPlay = true,
}) async {
WidgetsBinding.instance?.addObserver(this);
final MapEntry<String, VideoSource> entry = sources.entries.first;
_mounted = true;
_source = sources;
await changeSource(
name: entry.key,
source: entry.value,
autoPlay: autoPlay,
);
log("VIDEO VIEWER INITIALIZED");
Wakelock.enable();
}