@raydiant/playlist-window-manager 0.0.0-test-4 → 0.0.0-test-6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,6 +102,7 @@ var BrowserViewRenderer = /** @class */ (function () {
102
102
  this.offscreenWindow.addBrowserView(window.view);
103
103
  logger.info("playlist-window-manager/src/BrowserViewRenderer.ts createWindow2 ".concat(JSON.stringify(window.bounds)));
104
104
  window.view.setBounds(window.bounds);
105
+ logger.info("playlist-window-manager/src/BrowserViewRenderer.ts createWindow3 ".concat(JSON.stringify(window.view.getBounds())));
105
106
  if (backgroundColor) {
106
107
  window.view.setBackgroundColor(backgroundColor);
107
108
  }
@@ -94,13 +94,15 @@ var BrowserWindowRenderer = /** @class */ (function () {
94
94
  });
95
95
  this.proxySettings = null;
96
96
  opts.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts constructor1 ".concat(JSON.stringify(opts.bounds)));
97
- this.offscreenWindow.setBounds(opts.bounds);
97
+ // TODO zlv added
98
+ this.offscreenWindow.setFullScreen(true);
99
+ // TODO zlv commented out
100
+ // this.offscreenWindow.setBounds(opts.bounds);
98
101
  opts.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts constructor2 ".concat(JSON.stringify({
99
102
  bounds: this.offscreenWindow.getBounds(),
100
103
  normalBounds: this.offscreenWindow.getNormalBounds(),
101
104
  contentBounds: this.offscreenWindow.getContentBounds(),
102
105
  })));
103
- this.offscreenWindow.maximize(); // TODO zlv added
104
106
  if (opts.proxySettings) {
105
107
  this.proxySettings = opts.proxySettings;
106
108
  }
@@ -186,9 +188,17 @@ var BrowserWindowRenderer = /** @class */ (function () {
186
188
  // Electron issue: https://github.com/electron/electron/issues/20357
187
189
  window.view.setBackgroundColor(backgroundColor === 'transparent' ? '#00000000' : backgroundColor);
188
190
  }
189
- this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow3: ".concat(JSON.stringify(window.bounds)));
190
- window.view.setBounds(window.bounds);
191
- this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ".concat(JSON.stringify(window.view.getBounds())));
191
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ".concat(JSON.stringify(window.bounds)));
192
+ // TODO zlv added
193
+ if (window.view instanceof electron_1.BrowserWindow) {
194
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow5: setFullScreen");
195
+ window.view.setFullScreen(true);
196
+ }
197
+ else {
198
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow6: setBounds");
199
+ window.view.setBounds(window.bounds);
200
+ }
201
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow7: ".concat(JSON.stringify(window.view.getBounds())));
192
202
  if (!this.proxySettings) return [3 /*break*/, 2];
193
203
  return [4 /*yield*/, window.view.webContents.session.setProxy(this.proxySettings)];
194
204
  case 1:
@@ -232,11 +242,24 @@ var BrowserWindowRenderer = /** @class */ (function () {
232
242
  this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds2: ".concat(JSON.stringify(__assign(__assign({}, window.bounds), { x: window.bounds.x + this.opts.bounds.x, y: window.bounds.y + this.opts.bounds.y }))));
233
243
  // Child BrowserWindows are absolutely positioned so we need to add the main windows
234
244
  // x/y to when updating the child window's bounds.
235
- window.view.setBounds(__assign(__assign({}, window.bounds), { x: window.bounds.x + this.opts.bounds.x, y: window.bounds.y + this.opts.bounds.y }));
245
+ // TODO zlv commented out
246
+ // window.view.setBounds({
247
+ // ...window.bounds,
248
+ // x: window.bounds.x + this.opts.bounds.x,
249
+ // y: window.bounds.y + this.opts.bounds.y,
250
+ // });
251
+ // TODO zlv added
252
+ window.view.setFullScreen(true);
253
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds3: ".concat(JSON.stringify({
254
+ bounds: window.view.getBounds(),
255
+ normalBounds: window.view.getNormalBounds(),
256
+ contentBounds: window.view.getContentBounds(),
257
+ })));
236
258
  }
237
259
  else {
238
- this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds3: ".concat(JSON.stringify(window.bounds)));
260
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds4: ".concat(JSON.stringify(window.bounds)));
239
261
  window.view.setBounds(window.bounds);
262
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds5: ".concat(JSON.stringify(window.view.getBounds())));
240
263
  }
241
264
  };
242
265
  BrowserWindowRenderer.prototype.showWindow = function (windowId, isFocused) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raydiant/playlist-window-manager",
3
- "version": "0.0.0-test-4",
3
+ "version": "0.0.0-test-6",
4
4
  "description": "Window manager for playlist playback.",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -70,8 +70,12 @@ export default class BrowserViewRenderer implements PresentationWindowRenderer {
70
70
  window.bounds
71
71
  )}`
72
72
  );
73
-
74
73
  window.view.setBounds(window.bounds);
74
+ logger.info(
75
+ `playlist-window-manager/src/BrowserViewRenderer.ts createWindow3 ${JSON.stringify(
76
+ window.view.getBounds()
77
+ )}`
78
+ );
75
79
 
76
80
  if (backgroundColor) {
77
81
  window.view.setBackgroundColor(backgroundColor);
@@ -77,7 +77,10 @@ export default class BrowserWindowRenderer
77
77
  opts.bounds
78
78
  )}`
79
79
  );
80
- this.offscreenWindow.setBounds(opts.bounds);
80
+ // TODO zlv added
81
+ this.offscreenWindow.setFullScreen(true);
82
+ // TODO zlv commented out
83
+ // this.offscreenWindow.setBounds(opts.bounds);
81
84
  opts.logger.info(
82
85
  `playlist-window-manager/src/BrowserWindowRenderer.ts constructor2 ${JSON.stringify(
83
86
  {
@@ -88,7 +91,6 @@ export default class BrowserWindowRenderer
88
91
  )}`
89
92
  );
90
93
 
91
- this.offscreenWindow.maximize(); // TODO zlv added
92
94
  if (opts.proxySettings) {
93
95
  this.proxySettings = opts.proxySettings;
94
96
  }
@@ -228,13 +230,24 @@ export default class BrowserWindowRenderer
228
230
  }
229
231
 
230
232
  this.logger.info(
231
- `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow3: ${JSON.stringify(
233
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ${JSON.stringify(
232
234
  window.bounds
233
235
  )}`
234
236
  );
235
- window.view.setBounds(window.bounds);
237
+ // TODO zlv added
238
+ if (window.view instanceof BrowserWindow) {
239
+ this.logger.info(
240
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow5: setFullScreen`
241
+ );
242
+ window.view.setFullScreen(true);
243
+ } else {
244
+ this.logger.info(
245
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow6: setBounds`
246
+ );
247
+ window.view.setBounds(window.bounds);
248
+ }
236
249
  this.logger.info(
237
- `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ${JSON.stringify(
250
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow7: ${JSON.stringify(
238
251
  window.view.getBounds()
239
252
  )}`
240
253
  );
@@ -286,18 +299,36 @@ export default class BrowserWindowRenderer
286
299
 
287
300
  // Child BrowserWindows are absolutely positioned so we need to add the main windows
288
301
  // x/y to when updating the child window's bounds.
289
- window.view.setBounds({
290
- ...window.bounds,
291
- x: window.bounds.x + this.opts.bounds.x,
292
- y: window.bounds.y + this.opts.bounds.y,
293
- });
294
- } else {
302
+ // TODO zlv commented out
303
+ // window.view.setBounds({
304
+ // ...window.bounds,
305
+ // x: window.bounds.x + this.opts.bounds.x,
306
+ // y: window.bounds.y + this.opts.bounds.y,
307
+ // });
308
+ // TODO zlv added
309
+ window.view.setFullScreen(true);
310
+
295
311
  this.logger.info(
296
312
  `playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds3: ${JSON.stringify(
313
+ {
314
+ bounds: window.view.getBounds(),
315
+ normalBounds: window.view.getNormalBounds(),
316
+ contentBounds: window.view.getContentBounds(),
317
+ }
318
+ )}`
319
+ );
320
+ } else {
321
+ this.logger.info(
322
+ `playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds4: ${JSON.stringify(
297
323
  window.bounds
298
324
  )}`
299
325
  );
300
326
  window.view.setBounds(window.bounds);
327
+ this.logger.info(
328
+ `playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds5: ${JSON.stringify(
329
+ window.view.getBounds()
330
+ )}`
331
+ );
301
332
  }
302
333
  }
303
334