1

I am writing a player to output video to TV from iOS device connected with HDMI.

I found the preferred screen mode and any other screen modes of the UIScreen might not be able to cover the tv screen. It behaves different with various models of TV.

However, the iTunes video player is able to cover the whole tv screen at any time.

I wonder how does it do that?

Is there any secret private api?

Slavik
  • 1,053
  • 1
  • 13
  • 26

2 Answers2

1

I can suggest you try the sample source code TVOut on GITHub - https://github.com/JohnGoodstadt/TVOut. I have found that it covers all the screen of the monitor types I have tried. It also allows you to alter the 'bounds' of the TV screen edge (so you can move out from the standard edge).

It uses the standard IOS api.

John Goodstadt
  • 678
  • 8
  • 13
  • There is still a black board around the output content on my Sony TV. – Slavik Oct 18 '12 at 04:00
  • What is your TV resolution? And how large is the black - my border is pretty minimal. You can try setting the contentInset to adjust the borders. self.externalDisplayHandler.contentInset = UIEdgeInsetsMake(-10, -10, -10, -10) to see if it is affected. – John Goodstadt Oct 19 '12 at 09:24
  • Apple know black borders are a problem. This is all commented in their WWDC 2011 video 406 Airplay and External Displays in IOS Apps. See from 30 minutes in. They have an Overscan property which can be any of 3 values: UIScreenOverscanCompensationScale, UIScreenOverscanCompensationInsetBounds or UIScreenOverscanCompensationInsetApplicationFrame. I default to 'InsetBounds'. You can try changing to one of the others if you look in ExternalDisplayHandler.m in function 'screenDidChange' for the line 'self.extScreen.overscanCompensation=' and alter this. Let me know if it makes a difference? – John Goodstadt Oct 19 '12 at 09:37
1

Try this at your own risk ;)

// Undocumented, may cause bugs!
[screen setOverscanCompensation:3];
RhodanV5500
  • 1,087
  • 12
  • 16