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

[Android] App crash when unmounting video #533

Merged
merged 3 commits into from
Mar 21, 2017

Conversation

dojiboy9
Copy link
Contributor

Fixes #492.

The problem is that ScalableVideoView and ReactVideoView were calling mMediaPlayer.release() on unmount, but were not resetting mMediaPlayer = null. The next time around (e.g. when isPlaying() is called), mMediaPlayer is in an invalid (released) state, but the null-checks do not get hit (because mMediaPlayer != null), which causes an exception to be thrown.

The issue has since been fixed in the release() method of ScalableVideoView (version 1.0.4). So I've bumped up the dependencies in build.gradle to use that. I've also changed cleanupMediaPlayerResources in ReactVideoView to use that method as well.

@mattapperson mattapperson merged commit c56fd2d into TheWidlarzGroup:master Mar 21, 2017
mattvot pushed a commit to calvium/react-native-video that referenced this pull request May 12, 2017
* master:
  Added flag for background mode (TheWidlarzGroup#563)
  issue 310 - Added a new property, ignoreSilentSwitch.  (TheWidlarzGroup#403)
  Add progressUpdateInterval to android-exoplayer (TheWidlarzGroup#540)
  Initial WPF Support (TheWidlarzGroup#385)
  added progressUpdateInterval to Android (TheWidlarzGroup#512)
  load new source if it is different (TheWidlarzGroup#502)
  Pausing progress if it was playing and the stating again (TheWidlarzGroup#526)
  bump android dependencies (TheWidlarzGroup#524)
  Update ExoPlayer to r2.2.0 (TheWidlarzGroup#505)
  Update readme (TheWidlarzGroup#497)
  [Android] App crash when unmounting video (TheWidlarzGroup#533)
  Fix/494 (TheWidlarzGroup#537)
  fix(RCTVideo.m): Fixed status bar disappearing issue
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.

[Android] App crash when unmounting video
2 participants