mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
8 lines
426 B
JavaScript
8 lines
426 B
JavaScript
import assert from 'node:assert/strict'
|
|
|
|
export function soakOptions(value) {
|
|
const phaseSeconds = value === undefined ? 90 : Number(value)
|
|
assert(Number.isInteger(phaseSeconds) && phaseSeconds >= 90 && phaseSeconds <= 3600, 'ARTPLAYER_MB_SOAK_SECONDS must be 90..3600 whole seconds per phase')
|
|
return { phaseSeconds, minimumMediaSeconds: Math.max(600, phaseSeconds * 3 + 60), timeoutMs: phaseSeconds * 2000 + 90000 }
|
|
}
|