I'm developing an app for Google Cast, and I'm testing at my Android TV with google cast.
I put a debbuging info to show screen resolution. My TV is 4K, but when displaying data from document.body.clientWidth and document.body.clientHeight I get 962x541. I was expecting at least Full HD 1920x1080.
Is there something I'm missing to set at receiver app?
For Android TV it should be similar, but on Chromecast Ultra, the receiver has 1080p physical resolution and 720p css resolution. The ratio between css and physical pixels is called "device pixel ratio" and can be accessed using CSS queries using dppx units (https://developer.mozilla.org/en-US/docs/Web/CSS/resolution), or img srcset attribute using pixel density descriptor (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img), or window.devicePixelRatio from JavaScript (https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio).