Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

play from folder #2

Open
duca14036 opened this issue Apr 6, 2019 · 1 comment
Open

play from folder #2

duca14036 opened this issue Apr 6, 2019 · 1 comment
Labels
question Further information is requested

Comments

@duca14036
Copy link

duca14036 commented Apr 6, 2019

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()
}
@thxou
Copy link
Collaborator

thxou commented Apr 11, 2019

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 thxou added the bug Something isn't working label Apr 11, 2019
@thxou thxou added question Further information is requested and removed bug Something isn't working labels Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants