public async Task RunPlayerAsync(string fileName) {
player.AllowClose = false;
player.Show();
IsStarted = true;
bool IsDownloaded = false;
if (fileName != null)
await SetNextVideoFileAsync(PlayerMode.Manual, fileName).ConfigureAwait(false);
else
IsDownloaded = await SelectNextVideoAsync(0, false).ConfigureAwait(false);
if (!IsDownloaded) {
await Task.Delay(1000).ConfigureAwait(false);
await PlayNextVideoAsync().ConfigureAwait(false);
}
}