ionic-audio
ionic-audio copied to clipboard
Remove deprecated argument from IonicAudioModule.forRoot in demo
After running the demo app the following Typescript error is thrown: Argument of type '{ provide: typeof AudioProvider; useFactory: any; }' is not assignable to parameter of type 'AudioProvider'. In the module definition the argument is of type AudioProvider, so I guess there have been changes and this is a leftover. I removed the arguments for the demo app.module definition to use the argument defaults instead (as it is seen in the installed npm package)
@lujakob can you explain me why this is also included
/**
* Sample custom factory function to use with ionic-audio
*/
export function myCustomAudioProviderFactory() {
return new WebAudioProvider();
}
do we need it? and second thing AudioProvider in import?
export function myCustomAudioProviderFactory is not needed but added by the author as an example for adding a custom AudioProvider. And as it's a demo, I didn't want to remove it (I wouldn't want to take the authority, I just fixed an error). AudioProvider in the import is unused as well and can be removed, correct.
Thanks