{"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":101,"sourceCode":"\n\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\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\tconst {isStudio} = useRemotionEnvironment();\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\tconst {isMutedForTimeline, isMutedForPlayback} = useMediaAudioState({\n\t\tmuted: muted ?? false,\n\t\tvolume: userPreferredVolume,\n\t\taudioEnabled: true,","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/remotion-dev/remotion/blob/46a3a6bf13ca367376ff18bbb06dae2e87e0d068/packages/core/src/audio/AudioForPreview.tsx#L83-L119","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":"46a3a6bf13ca367376ff18bbb06dae2e87e0d068","analyzedAt":"2026-08-12T17:18:50.444Z","contentChangedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}