-
Notifications
You must be signed in to change notification settings - Fork 32
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 Support #6
Comments
I have a pull request that is nearly complete(btw thanks for your device info module, helped me alot with this). The thing is, from what i've seen/tried: when playing an audio file from within android's own media player utility, you should write the name of the file without its extension ('beep"). However, the iOS implementation in this module requires an extension to play the sound("beep.mp3"). |
What about making the JS api require the file extension but then remove it automatically, if we're on android? |
@rebeccahughes that could be a possible solution. @Sh3rawi I have seen you published the android code as your own package (react-native-audio-player). I am currently developing the android versions of the app where I have used initally this audio player. So your work comes in handy for me. Do you still plan to send a pull request? I would appreciate to include your work into this repository as the two interfaces are really similar. |
@andreaskeller Yes I still want to do it. Could JS know what platform we are on without using an extra module as @rebeccahughes 's ? Or how about we let Android do the removal ? If we finish this the pull request would be ready. |
@Sh3rawi from javascript you could do something like if (Platform.OS === 'ios') { or put the different parts into files *.ios.js and *.android.js. But I think I would prefer if you would just remove the extension in the android java code. what do you think? |
Hmm. I guess doing it with the the Platform module is better as it also clarifies to anyone who wants to use the module and opens the JS file to see the api, to also directly see the manipulation - even without reading the docs. No ? |
Sounds good to me. |
Very well then. I'll check that everything is good and running to submit the PR. |
No description provided.
The text was updated successfully, but these errors were encountered: