MCPcopy
hub / github.com/chen-zeong/DTV / sanitizeDanmuOpacity

Function sanitizeDanmuOpacity

web/src/components/player/constants.ts:107–112  ·  view source on GitHub ↗
(value: number)

Source from the content-addressed store, hash-verified

105};
106
107export 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
114export const loadStoredVolume = (): number | null => {
115 if (typeof window === 'undefined' || !window.localStorage) {

Callers 10

afterCreateMethod · 0.90
createPanelMethod · 0.90
updateInputsMethod · 0.90
formatOpacityLabelMethod · 0.90
setSettingsMethod · 0.90
syncDanmuEnabledStateFunction · 0.90
createDanmuOverlayFunction · 0.90
MainPlayerFunction · 0.90
loadDanmuPreferencesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected