dmrschmidt / DSWaveformImage

Generate waveform images from audio files on iOS, macOS & visionOS in Swift. Native SwiftUI & UIKit views.
MIT License
978 stars 109 forks source link

WaveForm for the http local file without downloading #62

Closed AhmadDurrani579 closed 1 year ago

AhmadDurrani579 commented 1 year ago

Hi Dennis, I really love your Library but current I am working one of the chat application now I want to create the wavesammple its working fine when I am using your library but I am facing one problem I am saving the path in sql cipher and its return me like this type of path "http://localhost:52421/media/B46E57FB-2B84-4939-A127-ECBDD67301C4/87BF79CC-B842-4DB2-8BEB-817D9AA43C31/A70F087F-69D5-4245-BDC9-15C8A65324A6.m4a" so I don't want to download it is their any other way for doing this because of when I pass the asset to AVReader its give me nil

dmrschmidt commented 1 year ago

Hey,

short answer is: no. You always have to have the file downloaded first to show the full waveform.

long answer: I don’t think you‘ll be able to download the file on your setup by the looks of it. You’re getting a localhost URL, and unless the thing giving you that URL is on the same machine / iphone always, this won’t work. If you’re aware of that, never mind my comment :)

dmrschmidt commented 1 year ago

(in case you haven’t seen this yet: https://github.com/dmrschmidt/DSWaveformImage#loading-remote-audio-files-from-url)

If your setup with localhost would be intentional, desired and correct, this is the exact same way how to download the asset first.