www.3112.net > 如何检测AVPlAyEr的播放状态

如何检测AVPlAyEr的播放状态

参考下面的代码: [[NSNotificationCenter defaultCenter] addObserver: selector:@selector() name:AVPlayerItemDidPlayToEndTimeNotification object:];

参考下面的代码: [[NSNotificationCenter defaultCenter] addObserver: selector:@selector() name:AVPlayerItemDidPlayToEndTimeNotification object:];

- (void)syncScrubber { CMTime playerDuration = [self playerItemDuration]; if (CMTIME_IS_INVALID(playerDuration)) { mScrubber.minimumValue = 0.0; return; } double duration = CMTimeGetSeconds(playerDuration); if (isfinite(duratio...

参考下面的代码: [[NSNotificationCenter defaultCenter] addObserver: selector:@selector() name:AVPlayerItemDidPlayToEndTimeNotification object:];

检查文件格式,iphone是不能播放如RMVB等格式的文件的,或者将你的文件转为MP4,或者手机上安装AVplayer,用这个软件来播放其他格式的文件。

网站地图

All rights reserved Powered by www.3112.net

copyright ©right 2010-2021。
www.3112.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com