Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

NO-72/Stop double calling state changes #81

Merged
merged 4 commits into from
Aug 7, 2017
Merged

Conversation

Mecharyry
Copy link
Contributor

Problem

As per #72, state changes are being double called. An example of this can be seen here. Clients do not need to call stop as long as they call release, release calls stop internallywhich notifies of theonVideoStopped` event.

Solution

Swallow double calls of state through the StateChangedListeners.

Test(s) added

Yes, tested that double calling swallows the most recent event.

Screenshots

No UI changes.

Paired with

Nobody, but I did have a chat with @ouchadam about this 😄

@Mecharyry
Copy link
Contributor Author

test this please

@@ -23,22 +31,40 @@ void clear() {

@Override
public void onVideoPlaying() {
if (currentState == State.PLAYING) {
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think it's worth logging these scenarios?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, can never have too many logs 😄

@joetimmins joetimmins self-requested a review August 7, 2017 14:16
@joetimmins joetimmins self-assigned this Aug 7, 2017
Copy link
Contributor

@joetimmins joetimmins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 good stuff mate

@ouchadam ouchadam merged commit fefd9b7 into master Aug 7, 2017
@ouchadam ouchadam deleted the NO-72/stop_double_called branch August 7, 2017 14:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants