Chromebox 上的 ChromeOS 中的双屏信息亭模式?

Dual screen kiosk mode in ChromeOS on Chromebox?

我发现有几个地方在谈论尝试在屏幕之间扩展 window,启用了统一桌面标签,但没有用。

我还在 Windows 中发现了一些使用 Win32 调用来执行此操作的地方,这对 ChromeOS 毫无用处。

我只需要在第二个屏幕上放置第二个 Web 视图。它不需要是扩展 window。我只需要做这样的事情:

chrome.app.runtime.onLaunched.addListener(function() {
var screenOne = {
   'id': 'mainwin',
   'bounds': {
     'width': 768,
     'height': 1360
   }
};
    var screenTwo = {
   'id': 'secondwin',
   'bounds': {
     'left':768+768,
     'width': 768,
     'height': 1360
   }
 };
 chrome.power.requestKeepAwake("display");
 chrome.app.window.create('../index.html', (screenOne));
 chrome.app.window.create('../screen2/index.html', (screenTwo));
});

此外,在模拟器中运行的解决方案还可以加分。

这是我的解决方案,效果很好。它要求您将 system.display 添加到 manifest.json

中的权限对象
chrome.app.runtime.onLaunched.addListener(function() {
  var screenUrls = ['../index.html','../screen2/index.html'];
  chrome.system.display.getInfo(function(displays){
    for(var id in displays){
      var display = {
        id: displays[id].id,
        bounds:displays[id].bounds
      };

      chrome.app.window.create(screenUrls[id], display);
    }
   });
   chrome.power.requestKeepAwake("display");
});