如何在控制中心隐藏“正在播放的URL”

6

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

image.

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


嗨,Joost。你解决了这个问题吗?我也遇到了同样的问题。Jim - Jim
1个回答

2
你可以使用MPNowPlayingInfoCenter来控制这些信息。 defaultCenternowPlayingInfo字典控制了在锁定屏幕和命令中心中显示的有关当前音频曲目的信息。
MPNowPlayingInfoCenter *infoCenter = [MPNowPlayingInfoCenter defaultCenter];

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

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

完整的键列表在文档中列出,但看起来您想将曲目名称设置为空字符串。
MPMediaItemPropertyTitle : @""

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接