【问题标题】:iphone, ipad VGA External Display - tvOutManageriphone, ipad VGA 外接显示器 - tvOutManager
【发布时间】:2011-01-24 10:55:22
【问题描述】:

我使用所有示例和源代码将应用程序内容显示到外部 VGA 显示器。在应用程序内部播放视频时,在外部设备中出现以下情况。任何建议.. 我错过了什么.. 但在设备中它以很好的方式显示实际窗口..

【问题讨论】:

  • 我几乎懒散了。 :-P 你实际上需要问一些事情让任何人回答。不过画面很漂亮!
  • @Amigable 他确实问了一些问题 - 问题只是格式错误,所以问题最终成为替代文本。
  • 我说得对吗,你的 iPhone 显示视频,但你的电视显示漂亮的图像?
  • 是的,你说得对。这就是我的问题......
  • 你的代码弄错了。你应该在电视上推送你想要的视图......到电视上。 iPhone 的视图应保持原样。只需交换它,您就应该设置好了。

标签: iphone objective-c ipad vga television


【解决方案1】:

大家好,我在这里回答我自己的问题。

robterrell 的 TVOutManager 不会通过简单地执行 [[TvOutManager sharedinstance] startTvOut] 和 [[TvOutManager sharedinstance]s topTVOut] 将任何视频播放到外部设备;

这里我们将播放器的实例添加到 tvoutWindow。 [tvoutWindow addSubview:玩家的实例];

但这里的视频没有显示在设备中, 但您可以从设备控制外部窗口播放器。

干杯。

【讨论】:

    【解决方案2】:

       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 类中添加的代码。将设备连接到外部设备后。在打开镜像视频时没有得到任何东西..

    【讨论】:

      猜你喜欢
      • 2012-07-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多