cordova-plugin-nativeaudio icon indicating copy to clipboard operation
cordova-plugin-nativeaudio copied to clipboard

Test if asset has already been loaded

Open msmfsd opened this issue 7 years ago • 3 comments

Is there any way to test if an asset has already been loaded on device before doing a preloadComplex?

Cordova on iOS/Android

msmfsd avatar Feb 15 '17 01:02 msmfsd

Error: "A reference already exists for the specified audio id"

AmitMY avatar Mar 10 '17 11:03 AmitMY

Thanks @AmitMY - just to confirm - to test if an asset has already been loaded I have to load the asset and just do nothing if i get that error?

msmfsd avatar Mar 12 '17 00:03 msmfsd

Basically yes, if that error is thrown it means that the asset was already loaded, so imo, it should be a warning and not an error. @floatinghotpot thoughts?

AmitMY avatar Mar 12 '17 08:03 AmitMY