fix: player UX, ad fingerprinting, Android TV 9 white screen

Address issues #217 #218 and integrate the useful parts of PR #219 without
regressions: stop player rebuild on episode reverse, grid/paged episodes,
poster placeholders, chrome69 client transpile for Amlogic WebView, and
duration-signature ad block detection while keeping interstitial/proxy filters.

Bump to 4.9.15.
This commit is contained in:
kuekhaoyang
2026-07-25 14:43:30 +08:00
parent c846c60d0c
commit f98de077f7
17 changed files with 601 additions and 164 deletions
+7 -4
View File
@@ -4,8 +4,11 @@ import { promises as fs } from 'node:fs';
import path from 'node:path';
import { transform } from 'esbuild';
const TARGET = 'chrome83';
const UNSUPPORTED_LOGICAL_ASSIGNMENT = /(\?\?=|\|\|=|&&=)/;
// Android 9 / Amlogic TV WebViews are often Chrome 6674.
// chrome83 still emits `??` (Chrome 80+), which white-screens those devices.
const TARGET = 'chrome69';
// Logical assignment + nullish coalescing + optional chaining break old WebViews.
const UNSUPPORTED_MODERN_SYNTAX = /(\?\?=|\|\|=|&&=|\?\?|\?\.)/;
async function pathExists(filePath) {
try {
@@ -47,8 +50,8 @@ async function transpileFile(filePath) {
await fs.writeFile(filePath, result.code);
if (UNSUPPORTED_LOGICAL_ASSIGNMENT.test(result.code)) {
throw new Error(`${filePath} still contains logical assignment syntax after ${TARGET} transpilation.`);
if (UNSUPPORTED_MODERN_SYNTAX.test(result.code)) {
throw new Error(`${filePath} still contains modern syntax unsupported by ${TARGET} after transpilation.`);
}
}