laopunk / chordPlayer

WebAudio musical audio chord player
MIT License
5 stars 1 forks source link

Making chordPlayer work in Nativescript #5

Open rickdps opened 5 years ago

rickdps commented 5 years ago

Hi, First of all, I'd like to congratulate the authors for putting together this wonderful package. It is very cool indeed.

I've been developing an app using the Nativescript platform, which by the way uses javascript, CSS and XML to build cross-platform mobile apps.

Fortunately, I came across your package which is exactly what I need to finish the app. The problem is that it doesn't work in Nativescript, at least by the conventional way.

I would like to know if there is something I can do to make it work in Nativescript.

I know chordPlayer uses the (Web Audio APi) to render audio. Nativescript uses (android.audio.MediaPlayer) for Android and (AVAudioPlayer) for iOS.

Any help towards sorting this out is gonna be greatly appreciated. Thank you very much!

laopunk commented 5 years ago

Good evening Ricardo, thank you for the support.

You are absolutely right, chordPlayer uses the webAudio API and as a result is intended to work in a browser only. I have no experience in Nativescript I'm afraid and unfortunately no time at all to learn it or even investigate it ...

If anybody out there has a solution I'll be happy to review a PR, I shall therefore leave your Issue open in an attempt to attract fellow coders with a similar request.

Good luck :-)

rickdps commented 5 years ago

Nativescript has a webview which can potentially be used to solve this problem. What I need in order to test if that's the case is a sample code of your plugin in use. For example a simple html page demonstrating how it is used. I know you've given some instructions on the readme of the plugin but it is not very clear to me.

Thank you very much for you efforts in tyring to help me on this.

rickdps commented 5 years ago

Hi again. Well it turns out the plugin did work in nativescript. There is a problem, though. It is not working in webkit. Any thoughts?

Another thing I would like to know is if there is a way to change the sounds. I mean, by default the sound is a piano. I'd like to either change it to another sound, like a guitar or a different piano.

Thank you very much for any guidence toward solving this issues.