tronclass-auto 1.2.5 → 1.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tronclass-auto",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "自動觀看 eclass/TronClass 影片、填寫表單的 CLI 工具",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -199,10 +199,10 @@ async function launchBrowser(headless) {
199
199
  headless,
200
200
  slowMo: 50,
201
201
  args: [
202
+ '--disable-accelerated-video-decode',
202
203
  '--disable-background-timer-throttling',
203
204
  '--disable-backgrounding-occluded-windows',
204
205
  '--disable-renderer-backgrounding',
205
- '--disable-features=MediaFoundationVideoCapture,HardwareMediaKeyHandling',
206
206
  ]
207
207
  };
208
208
  if (exePath) launchOpts.executablePath = exePath;
package/src/tui.js CHANGED
@@ -2,6 +2,7 @@ const inquirer = require('inquirer');
2
2
  const chalk = require('chalk');
3
3
  const { loadConfig, saveConfig, BASE_URL } = require('./config');
4
4
  const { loadCookies } = require('./auth');
5
+ const pkg = require('../package.json');
5
6
 
6
7
  function box(lines, width = 52) {
7
8
  const top = '╔' + '═'.repeat(width - 2) + '╗';
@@ -25,7 +26,7 @@ async function mainMenu() {
25
26
  const config = loadConfig();
26
27
 
27
28
  box([
28
- chalk.bold.white('tronclass-auto v1.1.0'),
29
+ chalk.bold.white(`tronclass-auto v${pkg.version}`),
29
30
  chalk.gray('自動觀看 eclass/TronClass 影片'),
30
31
  '',
31
32
  `課程: ${chalk.cyan(config.courses.length + ' 個')} | Cookie: ${chalk.green('✓')} | 倍速: ${chalk.yellow(config.playbackRate || 2)}x`,