I’m trying to get getCurrentPosition() i only get an error from Xcode
this.iosAudio_file.getCurrentPosition().then((position) => {
console.log("audio position: " + position);
}).catch(_=>{
console.log("position error: ");
});
The error from Xcode:
2018-02-06 03:58:46.786217-0800 [2342:1572180] *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> Invalid number value (NaN) in JSON write
2018-02-06 03:58:46.789125-0800 [2342:1572180] exception nativeEvalAndFetch : ReferenceError: Can't find variable: nan
package.json
"cordova-plugin-media": "^5.0.2",
config.xml
<plugin name="cordova-plugin-media" spec="^5.0.2">
<variable name="KEEP_AVAUDIOSESSION_ALWAYS_ACTIVE" value="NO" />
</plugin>
It's a bug, should be fixed soon
https://issues.apache.org/jira/browse/CB-13852