Skip navigation
SmileyNinja
Currently Being Moderated

PlayTrait::canPause()

Apr 4, 2012 3:51 PM

The current implementation of Playtrait::canPause() is missing a state check in my opinion.

current version:

 

return _canPause;

 

I propose an additional check that _playState != PlayState.STOPPED since it makes no sense semantically to pause a stopped player. I know it seems like a minor thing but it actually resulted in confusing behavior in the ControlBarSample. When you hit the stop button it turns into a pause button. I think the added check is more natural behavior for canPause(). Thoughts, anyone?

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points