capacitor-community / native-audio

MIT License
109 stars 66 forks source link

GetDuration returns a fatal erro #77

Open raymac101 opened 1 year ago

raymac101 commented 1 year ago

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):

Smartphone (please complete the following information):