public void MpvOnEndFile(object sender, MpvEndFileEventArgs e)
        {
            this.Success = false;

            if (e.EventEndFile.Reason == MpvEndFileReason.Error)
            {
                this.IsLoading = false;
                this.Error     = new ImpError(ErrorType.FailedToOpenFile, e.EventEndFile.Error.ToString());
            }
        }
Exemple #2
0
        private void MpvOnEndFile(object sender, MpvEndFileEventArgs e)
        {
            bool shouldInvoke = !this.IsPlaying;

            // File died
            this.IsPlaying = false;
            this.Position  = 0;

            if (shouldInvoke)
            {
                this.Dispatcher.Invoke(() => MediaPlayerEnded?.Invoke());
            }
        }