SwiftAudioPlayer icon indicating copy to clipboard operation
SwiftAudioPlayer copied to clipboard

Change audio file download location

Open ericrohlman opened this issue 4 years ago • 3 comments

Add the ability to alter the remote audio file download location.

Default location is the user's documents directory.

ericrohlman avatar Aug 16 '21 21:08 ericrohlman

Created an experimental entrympoint to set download location through SAPlayer.Downloader.downloadDirectory. I didn't well test this but I recommend setting the directory before performing any downloads. Also it could be difficult to retrieve files if you forget which directory you saved it in (I haven't added anything to search all your files).

When you download a file you get the url of where it was saved back, I recommend saving that for good measure if you're going to be messing around with directories.

tanhakabir avatar Aug 17 '21 10:08 tanhakabir

Thanks for the reply! Excellent work on the player library. We are using it to play all of our audio files (offline and online) for the National Spelling Bee iOS app.

Ended up just keeping them in the Documents directory, mark the URL with a no-backup, and then just filter the files with 'mp3' filetypes when a user clears the audio cache?

You cool with us adding an acknowledgment in our upcoming release? New release should be week of 8/23. https://apps.apple.com/us/app/word-club-spelling-vocabulary/id1479862742

ericrohlman avatar Aug 21 '21 04:08 ericrohlman

Woah very cool! Yes of course! I appreciate the shoutout 😊

tanhakabir avatar Aug 24 '21 17:08 tanhakabir