I have created a web video consultation platform using tokbox API, but want to split a video consultation in dual monitor, so how can i do it? For example, if I have 4 users in current session then i will be able to drag a single user and open it into the different monitor.
Asked
Active
Viewed 29 times
1 Answers
1
Given that this is a web application you will need to open a new browser window on the new monitor window. I'm not sure whether this is possible. You can create a new window with window.open() but in my testing I couldn't figure out how to get it to move to the other monitor using eg. window.moveBy and window.moveTo.
You might need to create a desktop application using eg. Electron which has a screen API that lets you query what displays are available and open new BrowserWindows on those displays. See the documentation here: https://electronjs.org/docs/api/screen
Once you have a new window you can move your subscribers over to that window using the normal DOM APIs, removeChild and appendChild. eg.
var newWindow = window.open('about:blank', 'newWindow', 'width=500,height=500');
newWindow.document.body.appendChild(subscriber.element);

Adam Ullman
- 1,517
- 7
- 12