arielfaur / ionic-audio

An audio player for Ionic 3 and Angular 4. Works with HTML 5 audio or native audio using Cordova Media plugin.
http://arielfaur.github.io/ionic-audio/2.0/index.html
MIT License
321 stars 163 forks source link

online audio file not working on device #211

Closed rajneshkis13 closed 5 years ago

rajneshkis13 commented 5 years ago

i getting two type of errors

  1. audio error: when i m trying to play song online i got this error

2.factory is not a function when i m using this // IonicAudioModule.forRoot({ provide: AudioProvider, useFactory: myCustomAudioProviderFactory }),

Following steps I followed -

1.i m import these on my app module.ts file import { IonicAudioModule, AudioProvider, WebAudioProvider, defaultAudioProviderFactory, CordovaMediaProvider } from 'ionic-audio';

2. after that i m adding this export function myCustomAudioProviderFactory() { return new WebAudioProvider(); tried this also return (window.hasOwnProperty('cordova')) ? new CordovaMediaProvider() : new WebAudioProvider(); } 3. and i m adding this in provider

error_audio error