(value: number)
| 105 | }; |
| 106 | |
| 107 | export const sanitizeDanmuOpacity = (value: number): number => { |
| 108 | if (!Number.isFinite(value)) { |
| 109 | return 1; |
| 110 | } |
| 111 | return Math.min(DANMU_OPACITY_MAX, Math.max(DANMU_OPACITY_MIN, value)); |
| 112 | }; |
| 113 | |
| 114 | export const loadStoredVolume = (): number | null => { |
| 115 | if (typeof window === 'undefined' || !window.localStorage) { |
no outgoing calls
no test coverage detected