@raydiant/playlist-window-manager 0.0.0-test-5 → 0.0.0-test-7

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.
@@ -94,21 +94,14 @@ 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
- // TODO zlv commented out
98
- // this.offscreenWindow.setBounds(opts.bounds);
99
97
  // TODO zlv added
100
- this.offscreenWindow.setContentBounds(opts.bounds);
98
+ this.offscreenWindow.setFullScreen(true);
99
+ this.offscreenWindow.setBounds(opts.bounds);
101
100
  opts.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts constructor2 ".concat(JSON.stringify({
102
101
  bounds: this.offscreenWindow.getBounds(),
103
102
  normalBounds: this.offscreenWindow.getNormalBounds(),
104
103
  contentBounds: this.offscreenWindow.getContentBounds(),
105
104
  })));
106
- this.offscreenWindow.maximize(); // TODO zlv added
107
- opts.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts constructor3 ".concat(JSON.stringify({
108
- bounds: this.offscreenWindow.getBounds(),
109
- normalBounds: this.offscreenWindow.getNormalBounds(),
110
- contentBounds: this.offscreenWindow.getContentBounds(),
111
- })));
112
105
  if (opts.proxySettings) {
113
106
  this.proxySettings = opts.proxySettings;
114
107
  }
@@ -194,15 +187,18 @@ var BrowserWindowRenderer = /** @class */ (function () {
194
187
  // Electron issue: https://github.com/electron/electron/issues/20357
195
188
  window.view.setBackgroundColor(backgroundColor === 'transparent' ? '#00000000' : backgroundColor);
196
189
  }
190
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ".concat(JSON.stringify(window.bounds)));
191
+ // TODO zlv added
197
192
  if (window.view instanceof electron_1.BrowserWindow) {
198
- this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow3: ".concat(JSON.stringify(window.bounds)));
199
- window.view.setContentBounds(window.bounds);
193
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow5: setFullScreen");
194
+ window.view.setFullScreen(true);
195
+ window.view.setBounds(window.bounds);
200
196
  }
201
197
  else {
202
- this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ".concat(JSON.stringify(window.bounds)));
198
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow6: setBounds");
203
199
  window.view.setBounds(window.bounds);
204
200
  }
205
- this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow5: ".concat(JSON.stringify(window.view.getBounds())));
201
+ this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts createWindow7: ".concat(JSON.stringify(window.view.getBounds())));
206
202
  if (!this.proxySettings) return [3 /*break*/, 2];
207
203
  return [4 /*yield*/, window.view.webContents.session.setProxy(this.proxySettings)];
208
204
  case 1:
@@ -246,14 +242,9 @@ var BrowserWindowRenderer = /** @class */ (function () {
246
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 }))));
247
243
  // Child BrowserWindows are absolutely positioned so we need to add the main windows
248
244
  // x/y to when updating the child window's bounds.
249
- // TODO zlv commented out
250
- // window.view.setBounds({
251
- // ...window.bounds,
252
- // x: window.bounds.x + this.opts.bounds.x,
253
- // y: window.bounds.y + this.opts.bounds.y,
254
- // });
255
245
  // TODO zlv added
256
- window.view.setContentBounds(__assign(__assign({}, window.bounds), { x: window.bounds.x + this.opts.bounds.x, y: window.bounds.y + this.opts.bounds.y }));
246
+ window.view.setFullScreen(true);
247
+ window.view.setBounds(__assign(__assign({}, window.bounds), { x: window.bounds.x + this.opts.bounds.x, y: window.bounds.y + this.opts.bounds.y }));
257
248
  this.logger.info("playlist-window-manager/src/BrowserWindowRenderer.ts updateWindowBounds3: ".concat(JSON.stringify({
258
249
  bounds: window.view.getBounds(),
259
250
  normalBounds: window.view.getNormalBounds(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raydiant/playlist-window-manager",
3
- "version": "0.0.0-test-5",
3
+ "version": "0.0.0-test-7",
4
4
  "description": "Window manager for playlist playback.",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
@@ -77,10 +77,9 @@ export default class BrowserWindowRenderer
77
77
  opts.bounds
78
78
  )}`
79
79
  );
80
- // TODO zlv commented out
81
- // this.offscreenWindow.setBounds(opts.bounds);
82
80
  // TODO zlv added
83
- this.offscreenWindow.setContentBounds(opts.bounds);
81
+ this.offscreenWindow.setFullScreen(true);
82
+ this.offscreenWindow.setBounds(opts.bounds);
84
83
  opts.logger.info(
85
84
  `playlist-window-manager/src/BrowserWindowRenderer.ts constructor2 ${JSON.stringify(
86
85
  {
@@ -90,16 +89,7 @@ export default class BrowserWindowRenderer
90
89
  }
91
90
  )}`
92
91
  );
93
- this.offscreenWindow.maximize(); // TODO zlv added
94
- opts.logger.info(
95
- `playlist-window-manager/src/BrowserWindowRenderer.ts constructor3 ${JSON.stringify(
96
- {
97
- bounds: this.offscreenWindow.getBounds(),
98
- normalBounds: this.offscreenWindow.getNormalBounds(),
99
- contentBounds: this.offscreenWindow.getContentBounds(),
100
- }
101
- )}`
102
- );
92
+
103
93
  if (opts.proxySettings) {
104
94
  this.proxySettings = opts.proxySettings;
105
95
  }
@@ -238,23 +228,26 @@ export default class BrowserWindowRenderer
238
228
  );
239
229
  }
240
230
 
231
+ this.logger.info(
232
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ${JSON.stringify(
233
+ window.bounds
234
+ )}`
235
+ );
236
+ // TODO zlv added
241
237
  if (window.view instanceof BrowserWindow) {
242
238
  this.logger.info(
243
- `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow3: ${JSON.stringify(
244
- window.bounds
245
- )}`
239
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow5: setFullScreen`
246
240
  );
247
- window.view.setContentBounds(window.bounds);
241
+ window.view.setFullScreen(true);
242
+ window.view.setBounds(window.bounds);
248
243
  } else {
249
244
  this.logger.info(
250
- `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow4: ${JSON.stringify(
251
- window.bounds
252
- )}`
245
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow6: setBounds`
253
246
  );
254
247
  window.view.setBounds(window.bounds);
255
248
  }
256
249
  this.logger.info(
257
- `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow5: ${JSON.stringify(
250
+ `playlist-window-manager/src/BrowserWindowRenderer.ts createWindow7: ${JSON.stringify(
258
251
  window.view.getBounds()
259
252
  )}`
260
253
  );
@@ -306,14 +299,9 @@ export default class BrowserWindowRenderer
306
299
 
307
300
  // Child BrowserWindows are absolutely positioned so we need to add the main windows
308
301
  // x/y to when updating the child window's bounds.
309
- // TODO zlv commented out
310
- // window.view.setBounds({
311
- // ...window.bounds,
312
- // x: window.bounds.x + this.opts.bounds.x,
313
- // y: window.bounds.y + this.opts.bounds.y,
314
- // });
315
302
  // TODO zlv added
316
- window.view.setContentBounds({
303
+ window.view.setFullScreen(true);
304
+ window.view.setBounds({
317
305
  ...window.bounds,
318
306
  x: window.bounds.x + this.opts.bounds.x,
319
307
  y: window.bounds.y + this.opts.bounds.y,