void OnApplicationPause(bool pause) { bool wasPaused = appIsPaused; appIsPaused = pause; if (!wasPaused && pause && masterSource != null)// && !masterSource.IsPaused) { masterSource.Pause(); } if (wasPaused && !pause && masterSource != null)// && masterSource.IsPaused) { masterSource.Resume(); } }
private void BlindModeChanged() { if (TimeSource != null) { TimeSource.Pause(); } if (BlindMode) { TimeSource = new ManualTimeSource(new DispatcherClock(Dispatcher.FromThread(Thread.CurrentThread), TimeSpan.FromMilliseconds(10))); RefreshManualDuration(); } else { TimeSource = VideoPlayer.TimeSource; } }