mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-04-11 02:16:32 +00:00
now goes back to main frame when connection is terminated
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
|
||||
#import "StreamFrameViewController.h"
|
||||
#import "MainFrameViewController.h"
|
||||
#import "Connection.h"
|
||||
#import "VideoDecoderRenderer.h"
|
||||
#import "StreamManager.h"
|
||||
#import "ControllerSupport.h"
|
||||
@@ -29,11 +28,20 @@
|
||||
|
||||
_controllerSupport = [[ControllerSupport alloc] init];
|
||||
|
||||
StreamManager* streamMan = [[StreamManager alloc] initWithConfig:[MainFrameViewController getStreamConfiguration] renderView:self.view];
|
||||
StreamManager* streamMan = [[StreamManager alloc] initWithConfig:[MainFrameViewController getStreamConfiguration] renderView:self.view connectionTerminatedCallback:self];
|
||||
NSOperationQueue* opQueue = [[NSOperationQueue alloc] init];
|
||||
[opQueue addOperation:streamMan];
|
||||
}
|
||||
|
||||
- (void)connectionTerminated {
|
||||
NSLog(@"StreamFrame - Connection Terminated");
|
||||
UIAlertController* conTermAlert = [UIAlertController alertControllerWithTitle:@"Connection Terminated" message:@"The connection terminated unexpectedly" preferredStyle:UIAlertControllerStyleAlert];
|
||||
[conTermAlert addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action){
|
||||
[self performSegueWithIdentifier:@"returnToMainFrame" sender:self];
|
||||
}]];
|
||||
[self presentViewController:conTermAlert animated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
|
||||
Reference in New Issue
Block a user