jlesage / docker-firefox

Docker container for Firefox
MIT License
1.4k stars 266 forks source link

Not able to get the perfect resolution on mobile screen #193

Open shubham-yug opened 11 months ago

shubham-yug commented 11 months ago

Current Behavior

Is there any option to remove the below popup?

image

Also if i try to pass width 390 but there is some blank black space around the browser canvas. image

Expected Behavior

No response

Steps To Reproduce

No response

Environment

Container creation

   docker run -d \
-p 15001:5800 \
--shm-size 2g \
-e DISPLAY_WIDTH=390 \
-e DISPLAY_HEIGHT=844 \
-e FF_OPEN_URL=https://netbanking.hdfcbank.com/netbanking/ \
 -e FF_KIOSK=1 \
jlesage/firefox

Container log

bfd0b7cbda7e9375afabd3780cb65a82aa21f20162d3cf1d5ae51578ac13d47a

Container inspect

No response

Anything else?

No response

jlesage commented 11 months ago

Is there any option to remove the below popup?

If the side control window doesn't disappear automatically (it should after few seconds after to page loads), clicking the "X" should make it disappear.

Also if i try to pass width 390 but there is some blank black space around the browser canvas.

Note that DISPLAY_WIDTH and DISPLAY_HEIGHT define the size of the Firefox's window. 390 seems too small. I'm not sure the (desktop) interface is able to fit in this. On a mobile, you will have to accept some downscaling.

So I would try to set DISPLAY_WIDTH and DISPLAY_HEIGHT to a reasonable value, while keeping the same aspect ratio of your mobile's browser canvas.

You could also try to set to scaling mode to "Remote scaling" (from the side control window). This will provide you a 1:1 scaling and fill to whole browser canvas, but as I said, this might be too small for Firefox.