Get smartphone video resolution

Hi, I’m trying to build an app for iOS and Android that plays video and I’m using the plugin Easy Movie Texture for that. I would like to have different video resolutions to display and show one or another depending on the Smartphone resolution.

The problem is that, for example, iPhone 5 has a screen resolution of 640×1136, but it plays videos at 1920x1080. Screen.width and Screen.height give me the 640×1136, is there any way to get the display video resolution of the smartphone to play the video at the max resolution? I can’t find any solution and I’m a little desperate.

Thank you.

I finally solved this, here’s the solution if anyone is interested.

In a new script, I start “WebCamTexture” with a high resolution, if your device has a smaller resolution it will give you the maximum. Then, use width and height to get the resolution of your camera, that use to be the same resolution your device can play.

voidStart () {

WebCamTexture wct = newWebCamTexture (3840, 2160);
wct.Play ();

int w = wct.width;

wct.Stop ();

}

3 Likes

Thank you soo much for your answer!!

However: I still get the screen resolution and not the playable video resolution.

example: Screen resolution is 1920x1080, but 4k videos can be played and filmed. I still get 1920 for width and 1080 for height.