mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-17 22:23:52 +00:00
Immediately stop streaming when resigning active on tvOS
This commit is contained in:
@@ -164,6 +164,11 @@
|
|||||||
[_inactivityTimer invalidate];
|
[_inactivityTimer invalidate];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if TARGET_OS_TV
|
||||||
|
// Terminate the stream immediately on tvOS
|
||||||
|
Log(LOG_I, @"Terminating stream after resigning active");
|
||||||
|
[self returnToMainFrame];
|
||||||
|
#else
|
||||||
// Terminate the stream if the app is inactive for 10 seconds
|
// Terminate the stream if the app is inactive for 10 seconds
|
||||||
Log(LOG_I, @"Starting inactivity termination timer");
|
Log(LOG_I, @"Starting inactivity termination timer");
|
||||||
_inactivityTimer = [NSTimer scheduledTimerWithTimeInterval:10
|
_inactivityTimer = [NSTimer scheduledTimerWithTimeInterval:10
|
||||||
@@ -171,6 +176,7 @@
|
|||||||
selector:@selector(inactiveTimerExpired:)
|
selector:@selector(inactiveTimerExpired:)
|
||||||
userInfo:nil
|
userInfo:nil
|
||||||
repeats:NO];
|
repeats:NO];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)inactiveTimerExpired:(NSTimer*)timer {
|
- (void)inactiveTimerExpired:(NSTimer*)timer {
|
||||||
|
|||||||
Reference in New Issue
Block a user