private void SkipStepTimerElapsed(object sender, EventArgs eventArgs) { IPlayerContext pc = GetPlayerContext(); if (pc != null) { if (_skipStepValid) { int step = _skipSteps[_skipStepIndex]; if (step != 0) { pc.SkipRelative(TimeSpan.FromSeconds(_skipStepDirection * step)); } } else { if (_skipStepDirection == -1) { pc.SkipToStart(); } else { pc.SkipToEnd(); } } _skipStepIndex = 0; SkipStep = string.Empty; } }
/// <summary> /// Called from the skin if the user invokes the "InstantSkip" action. This will start the InstantSkip in the /// underlying player. /// </summary> public void InstantSkipBackward() { IPlayerContext pc = GetPlayerContext(); if (pc == null) { return; } ClearSkipTimer(); MediaModelSettings settings = ServiceRegistration.Get <ISettingsManager>().Load <MediaModelSettings>(); if (settings.PreferInstantSkipSeconds) { pc.SkipRelative(TimeSpan.FromSeconds(-settings.InstantSkipSeconds)); } else { pc.InstantSkip(-(int)settings.InstantSkipPercent); } }