我正在使用自定义Airplay按钮进行播放。它工作正常
volumeView = [[MPVolumeView alloc] initWithFrame:CGRectZero];
[volumeView setShowsVolumeSlider:NO];
for (UIButton *button in volumeView.subviews) {
if ([button isKindOfClass:[UIButton class]]) {
airplayButton = button; // @property retain
[airplayButton setImage:image forState:UIControlStateNormal];
[airplayButton setImage:image forState:UIControlStateSelected];
[airplayButton setImage:image forState:UIControlStateHighlighted];
[airplayButton setBounds:CGRectMake(0, 0, iconSize, iconSize)];
[airplayButton setBackgroundColor:[UIColor clearColor]];
}
}
问题是:Airplay设备在苹果电视断开连接后显示。
如果没有可用的设备,我想在播放按钮时显示警告。
有没有办法查看可用的airplay设备?