{"record":{"id":"29b43833e1465cc9","repo":"remotion-dev/remotion","slug":"no-src-was-passed-to-html5audio","errorCode":null,"errorMessage":"No 'src' was passed to <Html5Audio>.","messagePattern":"No 'src' was passed to <Html5Audio>\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/core/src/audio/AudioForPreview.tsx","lineNumber":102,"sourceCode":"\t// Typecheck that we are not accidentially passing unrecognized props\n\t// to the DOM\n\tconst _propsValid: IsExact<\n\t\ttypeof nativeProps,\n\t\tOmit<NativeAudioProps, 'crossOrigin' | 'src' | 'name' | 'muted'>\n\t> = true;\n\tif (!_propsValid) {\n\t\tthrow new Error('typecheck error');\n\t}\n\n\tconst [mediaVolume] = useMediaVolumeState();\n\tconst [playerMuted] = usePlayerMutedState();\n\n\tconst volumePropFrame = useFrameForVolumeProp(\n\t\tloopVolumeCurveBehavior ?? 'repeat',\n\t);\n\n\tif (!src) {\n\t\tthrow new TypeError(\"No 'src' was passed to <Html5Audio>.\");\n\t}\n\n\tconst preloadedSrc = usePreload(src);\n\n\tconst sequenceContext = useContext(SequenceContext);\n\n\tconst [timelineId] = useState(() => String(Math.random()));\n\n\tconst userPreferredVolume = evaluateVolume({\n\t\tframe: volumePropFrame,\n\t\tvolume,\n\t\tmediaVolume,\n\t});\n\n\twarnAboutTooHighVolume(userPreferredVolume);\n\n\tconst crossOriginValue = getCrossOriginValue({\n\t\tcrossOrigin,","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/audio/AudioForPreview.tsx#L84-L120","documentation":"Thrown by <Html5Audio> in preview when no src is supplied. Audio playback requires a source URL; an undefined/null/empty src is treated as a programming error rather than a silent skip.","triggerScenarios":"Passing src={undefined}, src={null}, src=\"\", or omitting src on <Audio>. Common when src comes from an async import or prop that hasn't resolved.","commonSituations":"Conditional src that is sometimes falsy; dynamic imports not yet loaded; misconfigured static asset path; typo in the prop name.","solutions":["Provide a valid string src: <Audio src=\"/audio/track.mp3\" />.","Conditionally render only when src is available: {src && <Audio src={src} />}.","Verify the asset import resolves to a URL string."],"exampleFix":"// before\n<Audio src={maybeUrl} />\n\n// after\n{maybeUrl ? <Audio src={maybeUrl} /> : null}","handlingStrategy":"type-guard","validationCode":"if (!src || typeof src !== 'string') {\n  // do not render <Audio>\n}","typeGuard":"const hasAudioSrc = (src: unknown): src is string =>\n  typeof src === 'string' && src.length > 0;","tryCatchPattern":null,"preventionTips":["Conditionally render <Audio> only when src is a non-empty string.","Validate asset imports resolve to URL strings."],"tags":["audio","src","props","validation"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}