📜  从 url 快速播放音频流 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:01.254000             🧑  作者: Mango

代码示例1
func loadRadio(radioURL: String) {

        guard let url = URL.init(string: radioURL) else { return }
        let playerItem = AVPlayerItem.init(url: url)
        player = AVPlayer.init(playerItem: playerItem)
        player?.play()
        startNowPlayingAnimation(true)
        played = true
    }