【问题标题】:Dual screen kiosk mode in ChromeOS on Chromebox?Chromebox 上的 ChromeOS 中的双屏信息亭模式?
【发布时间】:2015-12-01 04:48:53
【问题描述】:

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

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

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

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));
});

此外,在模拟器中运行的解决方案的奖励积分。

【问题讨论】:

    标签: google-chrome-app


    【解决方案1】:

    这是我的解决方案,效果很好。它要求您将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");
    });
    

    【讨论】:

      猜你喜欢
      • 2015-10-08
      • 2011-01-24
      • 2016-03-18
      • 2015-11-09
      • 1970-01-01
      • 1970-01-01
      • 2016-05-14
      • 2014-05-08
      • 1970-01-01
      相关资源
      最近更新 更多