()
| 445 | } |
| 446 | |
| 447 | getConnectionMultiplier() { |
| 448 | const connection = navigator?.connection || navigator?.mozConnection || navigator?.webkitConnection; |
| 449 | const effectiveType = String(connection?.effectiveType || '').toLowerCase(); |
| 450 | if (effectiveType === 'slow-2g' || effectiveType === '2g') return 3.0; |
| 451 | if (effectiveType === '3g') return 1.8; |
| 452 | if (connection?.saveData) return 1.5; |
| 453 | return 1.0; |
| 454 | } |
| 455 | |
| 456 | recordSuccess() { |
| 457 | this.failureCount = Math.max(0, this.failureCount - 1); |