Closed vinsent closed 2 years ago
版本: 'TXLiteAVSDK_Player', '8.2.9808' 使用 PLAYER_AVPLAYER 模式能正常唤起锁屏控制中心, 但是使用 PLAYER_FFPLAY 模式时始终无法唤起
此Demo也是如此, 验证如下: 类 MoviePlayerViewController, 方法: - (void)superPlayerDidStart:(SuperPlayerView *)player 中添加以下代码:
[UIApplication.sharedApplication beginReceivingRemoteControlEvents]; MPMediaItemArtwork *artWork = [[MPMediaItemArtwork alloc] initWithBoundsSize:CGSizeMake(128, 128) requestHandler:^UIImage * _Nonnull(CGSize size) { return [UIImage new]; }]; MPNowPlayingInfoCenter *infoCenter = MPNowPlayingInfoCenter.defaultCenter; NSMutableDictionary *dic = [infoCenter.nowPlayingInfo mutableCopy]; dic[MPMediaItemPropertyArtwork] = artWork; dic[MPMediaItemPropertyTitle] = @"Title"; dic[MPMediaItemPropertyArtist] = @"Name"; dic[MPMediaItemPropertyPlaybackDuration] = @(100); dic[MPNowPlayingInfoPropertyElapsedPlaybackTime] = @(10); dic[MPNowPlayingInfoPropertyPlaybackRate] = @1.0; infoCenter.nowPlayingInfo = [dic copy];
已经可以了 可以使用10.*版本
版本: 'TXLiteAVSDK_Player', '8.2.9808' 使用 PLAYER_AVPLAYER 模式能正常唤起锁屏控制中心, 但是使用 PLAYER_FFPLAY 模式时始终无法唤起
此Demo也是如此, 验证如下: 类 MoviePlayerViewController, 方法: - (void)superPlayerDidStart:(SuperPlayerView *)player 中添加以下代码: