Is there a way to control the size and location of the browser on multiple monitors / monitors?

Introduction

First of all, I know very well that webapps should not bother with the size or position of the window. Was through a lot of similar SO questions and forum posts.

But this is a special case when the browser is just a platform to run the application on several specific machines in a controlled environment.

Task

An application should manage windows through multiple displays. (up to 5)

What I tried so far

  • I was looking for methods to obtain information about the displayed information of the host system, but the window.screen object reports only the display properties on which the window is currently located (or is considered to be turned on if it is halfway on one)
  • I tried window.moveTo and window.open with the flags "left=123,top=123" , but they are always limited by the current display
  • I tried window.resize and window.open with the flags "height=123,width=123" , but just like with moveTo , they are limited by the current display.

Question

What can I do to make my application (without manually positioning the window) use all the free space in a multi-screen environment?

Scenario

Think about it, as I have two projectors aligned correctly and would like to do this:

  • each project designs different things (each projector designs its own browser window)
  • project an application onto both projectors (possibly in full screen mode)

There may be / should be a window with the layout logic of the main window

Note

I can use any flags , app or kiosk mode, since again: we are deploying the application in the target environment.

Browser options: Chrome (preferred), Chromium and Firefox on the Windows platform (because of the special video card that we will use for 5 displays).

Backup solution

Manually stretch the window through the available displays and run the applications in an iframe inside this window wizard.

Disadvantage . One process starts everything, so the application must break inside the frame and it will break everything.

Afterword

It would also be useful to resolve this issue: Full screen mode Windows / Chrome / ATI / Browser on multiple monitors

+8
javascript browser google-chrome multiple-monitors
source share
5 answers

Go with the chrome / firefox extension, which has access to windows / tabbed APIs. Either embed your application in the extension, or communicate with the extension through messages (chrome, there is an equivalent in firefox).

Chrome support is experimental.

+3
source share

You can use window.moveTo (-1000,100) to move the pop-up window to the second monitor in IE if you check the "allow script-open windows with no size or position restrictions" permission under "Internet Options / Security" / user level.

If only one monitor is connected, it will move the window to the edge of the main display. I have not found a way to do this in Chrome, but it does not seem to have the same security option.

+1
source share

I do not think that's possible. The browser does limit JavaScript in its permissions for security reasons. Perhaps you can manually (in JavaScript, of course) set the x and y position far beyond the screen so that it appears on another screen, but this was not a neat way to do this.

As far as I can tell, you have two options:

  • Create different pages for each screen and open them separately each time.
  • Create all the windows with the button and drag them to the corresponding screen. When the user presses the button, open the window in full screen / kiosk mode and download the content. However, I do not know what will happen if you activate a different screen while you are viewing in full screen. This can lead to invalidation and closure of full-screen mode.

This is the only way you can have different windows in browsers, as far as I know.

0
source share

Another possible solution is to use win32 to size and position the window.

As you can see in the solution to the issue: Chrome Packaged App and Dual Monitors (there is no code there, this is for reference only)

0
source share

Try using the chrome.windows interface to interact with browser windows. You can use this API to create, modify, and rearrange windows in a browser.

https://developer.chrome.com/extensions/windows

It even works with night view.

-one
source share

All Articles