i used all the examples and source code out there for displaying application content 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..
Asked
Active
Viewed 1,201 times
2
-
And I almost lolled. :-P You need to actually ask something for anybody to answer. Pretty picture though! – Prof. Falken Jan 24 '11 at 10:56
-
@Amigable He did ask something - the question was just malformed so the question ended up as the alt text. – John Parker Jan 24 '11 at 11:01
-
Am I getting this right, your iPhone shows the video, but your TV shows that pretty image? – Prof. Falken Jan 24 '11 at 11:05
-
yes u r right. that is what my problem here... – nik Jan 24 '11 at 11:09
-
1You've got your code the wrong way around. You should be pushing the view that you want on your TV... To the TV. The view for the iPhone should be left as is. Just swap it around and you should be set. – Aurum Aquila Jan 24 '11 at 12:32
-
You need to provide the code you are using for us to see what is wrong. For something simple though, have you tried robterrell's TVOutManager? https://github.com/robterrell/TVOutManager. As far as I know, that screen won't show if you are using that project. – Altealice Jan 24 '11 at 12:36
-
@Altealice: thanks for reply. that is what am using now "robterrell's TVOutManager", but it is not displaying anything........ here what i did is simply added a video on view did load and while switching mirror video to on am gettin aboove image in external device " tv connected" – nik Jan 24 '11 at 13:28
-
Can you provide the code you use? It should just be as easy as calling `[[TVOutManager sharedInstance] startTVOut];` and `[[TVOutManager sharedInstance] stopTVOut];` – Altealice Jan 24 '11 at 13:53
-
I swear tvout isn't used any more. Rather create another UIWindow and set the UIScreen it appears on? – Jonathan. Jan 24 '11 at 16:01
-
can any one post some code here which u got working fine in external window.. – nik Jan 25 '11 at 04:12
2 Answers
1
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..

Chetan Bhalara
- 10,326
- 6
- 32
- 51

nik
- 2,289
- 6
- 37
- 60
1
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.

nik
- 2,289
- 6
- 37
- 60