[在PlayerViewController中,我试图播放从“表”视图中选择的歌曲。有什么更好的方式编写player.playStream行?
player.playStream(fileUrl: "http://localhost/musicfiles" + Song[IndexPath].getName())
我看到一条错误消息:'Song.Type'类型的值没有下标
尝试一下!
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
player.playStream(fileUrl: "http://localhost/musicfiles" + Song[indexPath.row].getName())
}