Author Topic: [SOLVED] Player_GetPlayState() does not reflect changes after Player_PlayPause()  (Read 4275 times)

AvikB

  • Sr. Member
  • ****
  • Posts: 945
This is a very strange behavior. After calling
Code
Player_PlayPause()

i was trying to get the play state using:
Code
Player_GetPlayState()

But it seems Player_GetPlayState always returns the previous state.
Is there any way to get the play state after Player_PlayPause is called?
Last Edit: March 03, 2017, 01:41:41 AM by AvikB

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34416
Player_PlayPause() is asynchronous so if Player_GetPlayState() is called immediately then it will return the old state
i guess i can change it to wait for the command to complete before returning

AvikB

  • Sr. Member
  • ****
  • Posts: 945
Quote
i guess i can change it to wait for the command to complete before returning
That would be a good idea. Frankly i think Player_GetPlayState should return the current play state or maybe a new method like
Code
Player_GetCurrentPlayState()
would be really nice.


Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 34416