how to get .opus audio file duration in swift

Viewed 35

I am using 'YbridPlayerSDK' library to play opus audio

   let myEndpoint = MediaEndpoint(mediaUri: audioURL.absoluteString)
    try AudioPlayer.open(for: myEndpoint, listener: nil) {
        (control) in /// called asychronously
        
        control.play()
        
    }

The above code play the audio but I am not able to find out its duration. how to get audio duration

0 Answers
Related