native-audio icon indicating copy to clipboard operation
native-audio copied to clipboard

GetDuration returns a fatal erro

Open raymac101 opened this issue 1 year ago • 0 comments

Describe the bug When trying to get the duration of an audio track it returns NaN

To Reproduce

      NativeAudio.getDuration({ assetId: 'audioID'}).then(result => {
        console.log('Get Duration returned : ', result);
        console.log('Duration = ' + result.duration);
      })

Expected behavior Expect it to return the length of the audio file

Screenshots CapacitorNativeAudioStreamer/AudioAsset.swift:63: Fatal error: Unexpectedly found nil while unwrapping an Optional value 2023-03-27 14:15:41.114043-0600 App[2986:978608] CapacitorNativeAudioStreamer/AudioAsset.swift:63: Fatal error: Unexpectedly found nil while unwrapping an Optional value

Desktop (please complete the following information):

  • OS: iOS
  • Browser chrome
  • Version

Smartphone (please complete the following information):

  • Device: iPhone13
  • OS: iOS 16.3.1
  • Browser ionic app
  • Version ionic 6.20.5

raymac101 avatar Mar 27 '23 20:03 raymac101