ios - 如何在 iOS 中播放 Live Radio Streaming URL 的 URL

标签 ios

我的电台 URL 是 http://s2.yesstreaming.net:7091/stream而且我无法在我的 Xcode 项目中播放此 URL。

最佳答案

你可以使用 VLCKit为了它。 我已经测试过,它处理给定的链接。

我不知道您是用 Swift 还是 Objective-C 编写代码,但这里有一个非常简单的 Swift 示例。

let mediaPlayer = VLCMediaPlayer()

mediaPlayer.media = VLCMedia(url: "http://s2.yesstreaming.net:7091/stream")

// outputView is the view where you want to display the stream
mediaPlayer.drawable = outputView
mediaPlayer.play()

关于ios - 如何在 iOS 中播放 Live Radio Streaming URL 的 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49665141/

相关文章:

ios - 用于连接 iOS 中的 Red5 服务器的免费客户端库

ios - 为什么 UIAElement 的 child 不等于自己?

c++ - JUCE 断言失败 - iOS 上的 IIRFilter

ios - 在后台测距 iOS 信标

ios - Swift 4 转换 - 类型 'NSLayoutConstraint' 没有成员 'FormatOptions' 。什么是正确的电话?

ios - 将离线 map 嵌入 IOS 应用程序

ios - 错误: Use the unresolved identifier 'indexPath'

ios - 线程 3 : EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT, 子代码 = 0xdefe)

ios - 通过快速返回键关闭键盘

ios - 如何在 Core Animation 中平滑地更新动画的 toValue/end 点?