提交 3b63d994 编写于 作者: X xinzhengzhang 提交者: Zhang Rui

ios/IJKAVMoviePlayer set screen close when playing was interrupted

上级 ddef043c
......@@ -232,7 +232,6 @@ static IJKAVMoviePlayerController* instance;
- (void)setScreenOn: (BOOL)on
{
[IJKMediaModule sharedModule].mediaModuleIdleTimerDisabled = on;
// [UIApplication sharedApplication].idleTimerDisabled = on;
}
- (void)dealloc
......@@ -274,6 +273,7 @@ static IJKAVMoviePlayerController* instance;
- (void)stop
{
[_player pause];
[self setScreenOn:NO];
_isCompleted = YES;
}
......@@ -644,7 +644,8 @@ static IJKAVMoviePlayerController* instance;
dispatch_async(dispatch_get_main_queue(), ^{
[self didPlaybackStateChange];
[self didLoadStateChange];
[self setScreenOn:NO];
if (blockError == nil) {
blockError = [[NSError alloc] init];
}
......@@ -685,7 +686,8 @@ static IJKAVMoviePlayerController* instance;
dispatch_async(dispatch_get_main_queue(), ^{
[self didPlaybackStateChange];
[self didLoadStateChange];
[self setScreenOn:NO];
[[NSNotificationCenter defaultCenter]
postNotificationName:IJKMPMoviePlayerPlaybackDidFinishNotification
object:self
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册