Soundable icon indicating copy to clipboard operation
Soundable copied to clipboard

play from folder

Open duca14036 opened this issue 6 years ago • 1 comments

If files are located in subfolder thant it will not play even if to indicate file with path Sound.swfit should be changed to this function

public init(fileName: String, bundle: Bundle = Bundle.main) {
    super.init()
    
    let urlName = URL(fileURLWithPath: fileName)
    let file = urlName.deletingPathExtension().path
    let fileExtension = urlName.pathExtension
    
    name = fileName
    if let path =  bundle.path(forResource: file, ofType: fileExtension) {
        url = URL(fileURLWithPath: path)
        identifier = url?.absoluteString ?? ""
    }
    
    preparePlayer()
}

duca14036 avatar Apr 06 '19 13:04 duca14036

Thanks for the report @duca14036. I haven't been able to reproduce the issue by creating subfolders and placing the audios there. Do you have a more concrete example, like where are you creating the subfolders or if you are trying to reproduce a sound located in a subfolder different than the bundle?.

thxou avatar Apr 11 '19 08:04 thxou