Fullscreen media.play()

Is there any way to have media.playVideo fullscreen on Android, iPhone 4 and 5, and the iPad? On the iPhone 5 I get black bars on top and bottom and on the iPad I get the black bars on the sides.

 

1.) My video files are in my project folders (local). They are 384x610, so larger than the screens width and height.

2.) It is Portrait only orientation.

3.) I have all launch files in the resource directory.

4.) When I played the video remotely, I didn’t have this problem… It takes to long to load for the game I’m creating though.

 

Here is my config.lua: 

 

–calculate the aspect ratio of the device:

local aspectRatio = display.pixelHeight / display.pixelWidth

 

application = {

   content = {

      width = aspectRatio > 1.5 and 320 or math.ceil( 480 / aspectRatio ),

      height = aspectRatio < 1.5 and 480 or math.ceil( 320 * aspectRatio ),

      scale = “letterBox”,

      fps = 30,

 

      imageSuffix = {

         ["@2x"] = 1.5,

         ["@4x"] = 3.0,

      },

   },

Since you’re using “letterbox” scale, your content area is the letterbox size. So, the video will occupy that space. You may want to experiment with “zoomEven” scale mode, which will size the content area to fill the screen in the “shorter” direction, while pushing some content (bleed) off the other edges.

Best regards,

Brent

Thank you for the quick response!!

Since you’re using “letterbox” scale, your content area is the letterbox size. So, the video will occupy that space. You may want to experiment with “zoomEven” scale mode, which will size the content area to fill the screen in the “shorter” direction, while pushing some content (bleed) off the other edges.

Best regards,

Brent

Thank you for the quick response!!