Skip to content

Commit

Permalink
Update RNPlayAudioModule.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ithustle authored Oct 28, 2018
1 parent 1815d35 commit 473226d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void onPrepared(MediaPlayer mp) {
mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
try {
Uri uri = Uri.parse("android.resource://" + getReactApplicationContext().getPackageName() + "/raw/" + name);
mediaPlayer.setDataSource(uri);
mediaPlayer.setDataSource(getCurrentActivity(), uri);
mediaPlayer.prepareAsync();
} catch(IOException e) {
Log.e("RNPlayAudio", "Exception", e);
Expand Down

0 comments on commit 473226d

Please sign in to comment.