【问题标题】:iOS Shoutcast access metadata using SwiftiOS Shoutcast 使用 Swift 访问元数据
【发布时间】:2020-10-12 20:28:48
【问题描述】:

好的,所以我查看了许多类似的堆栈问题,但没有一个有效,或者太老而无法考虑。

如果重要的话,这里是流地址:http://51.255.8.139:8822/stream

注意:我是 iOS 编程新手,这是我的第一个项目。

我使用了AVFoundationAVAsset 附上URLAVPlayer 来播放它。这行得通。

但是,我无法从流中获取任何元数据。喜欢当前的歌曲名称。


我尝试过的值得注意的事情:

  • asset.timedMetadata 什么都没有
  • official apple tutorial availableMetadataFormats 是空的
  •  playerItem!.observe(\AVPlayerItem.timedMetadata, options: .new) {
             (player, change) in print(change)
        } 
    
    也是空的

【问题讨论】:

    标签: ios swift metadata shoutcast


    【解决方案1】:

    对于任何想要这样做的人, 我在苹果开发者论坛https://developer.apple.com/forums/thread/650170得到了答案

    但基本上timedMetadata 应该可以工作,(在 iOS 14 之前它只会给出流名称)。

    【讨论】:

      猜你喜欢
      • 2016-11-27
      • 1970-01-01
      • 1970-01-01
      • 2012-03-03
      • 1970-01-01
      • 2015-10-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多