iphone, ipad VGA External Display - tvOutManager
i used all the examples and source code out there for displaying application con开发者_StackOverflowtent to external VGA display. while playing video in inside of the application am getting bellow thing in external device. any suggestion.... am i missing somthing.. but in device it showing actual window in fine way..
Hello All here am answering to my own question.
robterrell's TVOutManager will not play any video to external device by simply doing [[TvOutManager sharedinstance] startTvOut] and [[TvOutManager sharedinstance]s topTVOut];
here we have add the instance of player to tvoutWindow. [tvoutWindow addSubview:player's instance];
but here thing is the video is not displayed in device, but you can control external window player from device.
cheers.
NSString *url = [[NSBundle mainBundle] pathForResource:@"Overview" ofType:@"mov"];
player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(movieFinishedCallback:)name:MPMoviePlayerPlaybackDidFinishNotification object:player];
//---play partial screen---
player.view.frame = CGRectMake(35, 450, 430, 300);
[self.view addSubview:player.view];
[player play];
- (void) movieFinishedCallback:(NSNotification*) aNotification {
[[TVOutManager sharedInstance] startTVOut];
player = [aNotification object];
[[NSNotificationCenter defaultCenter]
removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:player];
[player stop];
}
this the code am added in mainviewController class in robterrell's TVOutManager sample application. after connecting device into external device. while switching mirror video on am not getting anything..
精彩评论