iPhone、iPad VGA外部ディスプレイ-TVOUTMANAGER
-
23-10-2019 - |
質問
アプリケーションコンテンツを外部VGAディスプレイに表示するために、すべての例とソースコードを使用しました。アプリケーションの内部でビデオを再生している間、外部デバイスでは次のようなものを取得しています。どんな提案でも....私は何かが欠けていますか..しかし、デバイスでは、実際のウィンドウをすばらしい方法で示しています。
解決
こんにちはすべてここに私自身の質問に答えています。
RobterrellのTVOutManagerは、[[tvoutmanager sharedInstance] starttvout]および[[tvoutmanager sharedInstance] s toptvout]を単に実行することで、外部デバイスにビデオを再生しません。
ここでは、プレーヤーのインスタンスをTVOutWindowに追加しました。 [tvoutwindow addsubview:プレーヤーのインスタンス];
しかし、ここでは、ビデオはデバイスに表示されていませんが、デバイスから外部ウィンドウプレーヤーを制御できます。
乾杯。
他のヒント
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];
}
これにより、コードはRobterrellのTVOutManagerサンプルアプリケーションのMainViewControllerクラスに追加されます。デバイスを外部デバイスに接続した後。ミラービデオを切り替えている間、何も取得していません。
所属していません StackOverflow