VideoPlayerForm::OnTouchPressed(const Control& source, const Point& currentPosition,
const TouchEventInfo& touchInfo)
{
- AppLogDebug("OnTouchPressed");
+ AppLogDebug("OnTouchPressed Control : %ls", source.GetName().GetPointer());
__pUiControlTimer->Cancel();
-
- if (source.GetHashCode() == __pSlider->GetHashCode())
- {
- PlayerState playState = PLAYER_STATE_ERROR;
- playState = __pVideoPlayerPresentationModel->GetState();
-
- if (playState == PLAYER_STATE_PLAYING)
- {
- result r = __pVideoPlayerPresentationModel->PausePlay();
- TryReturnVoid(r == E_SUCCESS, "__pVideoPlayerPresentationModel->PausePlay() failed:%s", GetErrorMessage(r));
- __playingBeforeSlide = true;
- }
- }
}
void
VideoPlayerForm::OnTouchReleased(const Control& source, const Point& currentPosition,
const TouchEventInfo& touchInfo)
{
- AppLogDebug("OnTouchReleased");
+ AppLogDebug("OnTouchReleased Control : %ls", source.GetName().GetPointer());
PlayerState playState = PLAYER_STATE_ERROR;
VideoPlayerForm::OnTouchLongPressed(const Control& source, const Point& currentPosition,
const TouchEventInfo& touchInfo)
{
- AppLogDebug("OnTouchLongPressed");
+ AppLogDebug("OnTouchLongPressed Control : %ls", source.GetName().GetPointer());
if (&source == __pFastForwardButton)
{
__pVideoPlayerPresentationModel->FastRewind(true);
}
}
+ else if (&source == __pSlider)
+ {
+ PlayerState playState = PLAYER_STATE_ERROR;
+ playState = __pVideoPlayerPresentationModel->GetState();
+
+ if (playState == PLAYER_STATE_PLAYING)
+ {
+ result r = __pVideoPlayerPresentationModel->PausePlay();
+ TryReturnVoid(r == E_SUCCESS, "__pVideoPlayerPresentationModel->PausePlay() failed:%s", GetErrorMessage(r));
+ __playingBeforeSlide = true;
+ }
+ }
}
void