ech*_*cho 11 audio objective-c ios airplay apple-tv
当通过AirPlay(使用iOS9.2)从连接到Apple TV的iOS设备播放声音时,声音播放的前一秒左右会被切断.这种不受欢迎的行为不是应用程序特定的,而是系统范围的(例如Apple的官方应用程序也有此错误).
请参阅https://forums.developer.apple.com/thread/28086
是否有audio file可以播放完整的解决方法?例如blank sounds在播放文件之前添加?或改变如何API调用?或者我应该等待Apple正式修复?
示例代码:
audioPlayer.actionAtItemEnd = AVPlayerActionAtItemEndNone;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(playEnded:)
name:AVPlayerItemDidPlayToEndTimeNotification
object:[audioPlayer currentItem]];
- (void)playEnded:(NSNotification *)notification
{
// Start the full audio file here
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
276 次 |
| 最近记录: |