Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid Warning/Exception when Android video is playing and app is paused #3889

Merged
merged 1 commit into from
Jun 2, 2015

Conversation

pelayomendez
Copy link
Contributor

…and resumed

By doing using reset() before releasing the media player we avoid the "mediaplayer went away with unhandled events" warning:

mediaPlayer.reset();
mediaPlayer.release();

Also by reseting the mediaplayer after creating it we avoid the internal/external state mismatch corrected exception when pausing resuming the app. Doing that forces us also to keep track of loop state when resuming the video.

06-02 18:05:37.195: E/MediaPlayer(30590): internal/external state mismatch corrected

…e and resume the app

By doing using reset() before releasing the media player we avoid the "mediaplayer went away with unhandled events" warning:

mediaPlayer.reset();
mediaPlayer.release();

Also by reseting the mediaplayer after creating it we avoid the internal/external state mismatch corrected exception when pausing resuming the app. Doing that forces us also to keep track of loop state when resuming the video.

06-02 18:05:37.195: E/MediaPlayer(30590): internal/external state mismatch corrected
@arturoc
Copy link
Member

arturoc commented Jun 2, 2015

thanks!

arturoc added a commit that referenced this pull request Jun 2, 2015
Avoid Warning/Exception when Android video is playing and app is paused
@arturoc arturoc merged commit f9ab5d2 into openframeworks:master Jun 2, 2015
@kylemcdonald kylemcdonald mentioned this pull request Nov 1, 2015
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants