AVPlayer 监听播放时长错误capturing 'self' strongly in this block is likely to lead to a retain cycle 的解决方法


__weak typeof(self) weakSelf = self;
    
	/* Update the scrubber during normal playback. */
	[weakSelf.player addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(interval, NSEC_PER_SEC)
                                                                queue:NULL /* If you pass NULL, the main queue is used. */
                                                           usingBlock:^(CMTime time)
                      {
                          [self syncScrubber];
                      }];


连接:https://www.google.com.hk/search?q=capturing+%27self%27+strongly+in+this+block+is+likely+to+lead+to+a+retain+cycle&oq=capturing+%27self%27+strongly+in+this+block+is+likely+&aqs=chrome.1.69i57j0l5.13939j0j7&sourceid=chrome&espv=210&es_sm=119&ie=UTF-8

你可能感兴趣的:(ios,bug,avplayer)