Two computer screens, can you click the button on one screen and pop up a window to the other screen?

now the product manager wants me to implement a function of connecting dual screens with the same host, opening a web page on one screen, and then clicking a button in it to pop up a window to another screen (or you don"t need to pop it over. You can pull it in advance, but when you click on a video link on one screen, play the video on another screen). Can this effect be achieved? Using window.open () can only open windows to the same browser

-update
doesn"t seem to work. My bricks are ready. Thank you

clipboard.png


clipboard.png

you can take a look at our more abnormal

.

finally beat the product, and the product was stable


the essence of this problem is [inter-page communication].
if I have two monitors and the main chrome is on the left monitor, it is not easy to do it from the js level (don't say dead, beware of hitting the face) to generate a chrome page directly from the left monitor, which appears on the right display.
We settle for second best by generating a proxyPage (proxy page) on the left, dragging it manually to the right display, and then communicating between the left page and the proxyPage page.

I have to catch the bus. I'll throw you 2 demo.

https://pingfengafei.github.i.

https://pingfengafei.github.i.

the second link uses postMessage, which is more reasonable.


[you don't need to bounce over, you can pull through in advance], so there is a way to work
beforehand: run window.open () in webpage 1 to open webpage 2, and then click on the video link in webpage 1 after pulling webpage 2 to another screen
. Webpage 1 controls webpage 2 to play video
as a simple example, open a Baidu first, and then run the following two pieces of code

in turn.
var newWindow=window.open('https://www.baidu.com/');
newWindow.alert('test');
newWindow.focus();

this enables you to control one page in another


https://developers.google.com.
Present web pages to secondary attached displays | Web | Google Developers

Presentation API, can be used as an idea, but it is currently only available in Chrome and Firefox.


your products are quite unnatural.
ask him to find the address of the website, refer to
, tell him if you don't have it, you won't do it!


tell him to find a reference object


that is, cross-screen this is impossible, that is, the front-end js script cannot cross browsers. Take the brick, brother


get the double screen information and calculate the coordinates of the sub-screen.


< H1 > obviously needs some foreign aid, such as powerful cPP and c < / H1 >.

first of all, we develop an exe client for users to install (refer to Tenpay password control) and register the calling protocol on the computer.

then you use html's href call to pull up the client and pass parameters to the client to create a new browser on another monitor to open your uri.

reference: https://blog.csdn.net/bzt8208.

on the same floor, you need cPP to open a browser, actually copy a screen, and then simulate the click event


because you say you can pull the window over, can't websocket do it? It is equivalent to doing two client, one is responsible for clicking the link, and the other is used to play the link video, do I understand it correctly? If you play directly, it's impossible.


first pull a window from screen A to screen B. Then click the button on screen A to store the url to be played in sessionStorage, while screen B gets the url, by polling and plays it. Ps: came up with such a plan on the spur of the moment.


prepare bricks first.
A web page can never guarantee that the display mode is extended, not to mention the web page, which can be displayed on the screen, and the native software can only be seen by potplayer (specify the extension screen serial number in the setting, open the expansion mode to see it). No, no, no.

in addition, the shortcut key for windows to quickly switch between extended screens is win+shift+ left / right (see which side of the screen to be moved)


  • Standard practice websocket to another, but the backend should cooperate
  • simple practice the use of, js target none of the people answered above know at all
<a href=url target="_blank">url</a> 


<a href=url target="myname">url</a>

window.open('http://www.baidu.com','myname');

just communicate and interact with websocket

Menu