edimuj / cordova-plugin-audioinput

This iOS/Android Cordova/PhoneGap plugin enables audio capture from the device microphone, by in near real-time forwarding audio to the web layer of your application. A typical usage scenario for this plugin would be to use the captured audio as source for a web audio node chain, where it then can be analyzed, manipulated and/or played.
https://github.com/edimuj/app-audioinput-demo
MIT License
161 stars 88 forks source link

Play remote audio file #49

Closed d8bhatta closed 7 years ago

d8bhatta commented 7 years ago

Hello,

I am trying to play remote audio file through this plugin. Here is my script https://pastebin.com/K08PbXU2

I can make sure that my audio file url is correct but still this plugin is not playing the audio.

Next, I have downloaded the audio file into cordova file system and tried to play it but its not playing. I have checked that the audio file exists in the system.

This is critical to my project and the project I am doing will help for blind people to know about surrounding so your answer is really very important. Looking forward.

edimuj commented 7 years ago

Hi, in the Pastebin you posted, I cannot see how the code is related to this plugin.

The purpose of the plugin is to capture audio from the device microphone. So it isn't a multi-purpose audio plugin, and hasn't, therefore, any built-in support for playing back local or remote audio files.

There are many other ways of playing back audio files in Cordova apps, like for example the cordova-plugin-media, cordova-plugin-nativeaudio or through HTML/javascript by using the Audio element and/or Web Audio API.