Closed jc14 closed 6 years ago
@jc14 thanks for this! Curious if you have tested this for both version 7 and 8 of jwplayer? If I remember correctly they were handling these events a bit differently. I can test it out myself later today as well to make sure we don't break version 7, other than that looks good!
@ellell No problem! I've only tested this with version 8. I don't have an easy way of testing for version 7. I needed OnResume for a current project so I thought I would go ahead and add this.
@ellell Updated change to look for oldstate
to be paused
or buffering
. This should make this change compatible with version 7 and 8 though I have only tested with 8.
I also separated the onResume test into two for versions 7 and lower, and versions 8 and higher.
https://github.com/micnews/react-jw-player/issues/83
Solves issue with newer versions of jw player where on resume is being triggered through 'buffering' rather than 'paused'