Skip to content

Commit

Permalink
fix for loadAsset
Browse files Browse the repository at this point in the history
  • Loading branch information
cixio committed Jun 5, 2024
1 parent ecc78fa commit da28c6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ export default {
},

loadAsset: (asset: number) => {
RNSoundPlayer.loadUrl(resolveAsset(asset).uri);
if (!(__DEV__) && Platform.OS === "android") {
RNSoundPlayer.loadSoundFile(resolveAsset(asset).uri, '');
} else {
RNSoundPlayer.loadUrl(resolveAsset(asset).uri);
}
},

onFinishedPlaying: (callback: (success: boolean) => any) => {
Expand Down

0 comments on commit da28c6f

Please sign in to comment.