I have array of QueuePlayer as below,
Print Queue Player array : (
"<AVQueuePlayer: 0x7fed625a51c0>",
"<AVQueuePlayer: 0x7fed624baa00>",
"<AVQueuePlayer: 0x7fed624c43c0>"
)
On button click I am playing audio from above array,
-(IBAction)click_Play:(UIButton *)sender {
[(AVQueuePlayer *)[arrQueuePlayer objectAtIndex:sender.tag] setVolume:1.0];
[(AVQueuePlayer *)[arrQueuePlayer objectAtIndex:sender.tag] play];
}
Reason behind generating array of QueuePlayer is, my play button is in UITableView. Playing audio from array on button click works well only for the first time. If I click play button again. It's not playing sound. Don't know what is wrong. I checked it by debugging code, My array is getting nulled or anything. Then why it is not playing again on button click?
Please help me. Thanks in advance!