【问题标题】:How to hide "Now playing url" in control center如何在控制中心隐藏“正在播放的网址”
【发布时间】:2015-06-08 13:58:55
【问题描述】:

我正在尝试隐藏在 UIWebView 中播放的直播网址。 当您播放直播网址并打开控制中心 (iOS) 时,您会看到正在播放的网址:

我想用基于 HTML 或基于 xcode 的脚本来隐藏它。

【问题讨论】:

  • 嘿乔斯特。你有没有想过这个。我有同样的问题。吉姆

标签: ios objective-c uiwebview control-center


【解决方案1】:

您可以使用MPNowPlayingInfoCenter 控制此信息。 defaultCenternowPlayingInfo 字典控制在锁定屏幕和命令中心上显示有关当前音轨的内容。

MPNowPlayingInfoCenter *infoCenter = [MPNowPlayingInfoCenter defaultCenter];

NSDictionary *nowPlayingInfo = @{
                                 MPMediaItemPropertyTitle : @"Media Name",
                                 MPMediaItemPropertyArtist : @"Media Artist"
                                 };

[infoCenter setNowPlayingInfo:[NSDictionary dictionaryWithDictionary:nowPlayingInfo]];

文档中列出了完整的键列表,但您似乎想将轨道名称设置为空字符串。

MPMediaItemPropertyTitle : @""

【讨论】:

    猜你喜欢
    • 2021-07-26
    • 1970-01-01
    • 1970-01-01
    • 2019-08-01
    • 1970-01-01
    • 2011-04-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多