TheChan.ViewModels.VideoPlayerViewModel.SetupCustomPlayback C# (CSharp) Method

SetupCustomPlayback() private method

private SetupCustomPlayback ( ) : void
return void
        private async void SetupCustomPlayback() {
            IsInProgress = true;
            try {
                IRandomAccessStream stream = await CacheService.RetrieveStreamAsync(Attachment.Uri, CacheItemType.Video);
                FFmpegInteropMSS interop = FFmpegInteropMSS.CreateFFmpegInteropMSSFromStream(stream, true, true);
                MediaStreamSource mediaStreamSource = interop.GetMediaStreamSource();
                mediaStreamSource.BufferTime = new TimeSpan(0);
                Source = mediaStreamSource;
                IsInProgress = false;
            }
            catch {
                try {
                    await CacheService.DeleteItemAsync(Attachment.Uri);
                }
                catch { /* OK */ }
                IsInProgress = false;
                IsError = true;
                Status = Localization.GetForView("VideoPlayer", "Error");
            }
        }