I want to play from different local file from two different button using single player object.
appDeveloper7 opened this issue · comments
let filePath1 = "/var...."
let filePath2 = "/var...."
@IBAction func buttonOneClick(_ sender: Any) {
player.play(url: URL(fileURLWithPath: filePath1))
}
@IBAction func buttonTwoClick(_ sender: Any) {
player.play(url: URL(fileURLWithPath: filePath2))
}
Xcode console throwing this error while playing second music :
Error: (
"Couldn't parse the bytes from the stream. Status: It is not possible to produce output packets because the\nstreamed audio file's packet table or other defining information is not present or appears after the audio data."
)
This is a limitation of AudioFileStream
as it can only read optimised m4a files
From the Readme:
Known limitations:
As described above non-optimised M4A files are not supported this is a limitation of AudioFileStream Services
We want to play m4a file but from two different button with different audio file having m4a format.
Could you please assist here?