Skip to content

🎥 Make videos programmatically with React

Merge branch 'main' into ios-autoplay-issues

Jonny Burger92f9638af12d
diff --cc packages/core/src/audio/Audio.tsx
index 21201dce9f,1955a0f66c..c2f4c6beb8
--- a/packages/core/src/audio/Audio.tsx
+++ b/packages/core/src/audio/Audio.tsx
@@@ -12,12 -11,16 +12,17 @@@ const AudioRefForwardingFunction: React
HTMLAudioElement,
RemotionAudioProps & RemotionMainAudioProps
> = (props, ref) => {
+ const audioContext = useContext(SharedAudioContext);
const {startFrom, endAt, ...otherProps} = props;
- const onError = useCallback(() => {
- throw new Error(`Could not play video with src ${otherProps.src}`);
- }, [otherProps.src]);
+ const onError: React.ReactEventHandler<HTMLAudioElement> = useCallback(
+ (e) => {
+ throw new Error(
+ `Could not play audio with src ${otherProps.src}: ${e.currentTarget.error}`
+ );
+ },
+ [otherProps.src]
+ );
if (typeof startFrom !== 'undefined' || typeof endAt !== 'undefined') {
validateStartFromProps(startFrom, endAt);
diff --cc packages/core/src/internals.ts
index 0c5a5f820e,803464fccf..3a39d20885
--- a/packages/core/src/internals.ts
+++ b/packages/core/src/internals.ts
@@@ -175,8 -176,10 +180,12 @@@ export const Internals =
setProResProfile,
validateSelectedCodecAndProResCombination,
getMaxTimelineTracks,
+ SharedAudioContext,
+ SharedAudioContextProvider,
+ validateQuality,
+ validateFrame,
+ setStillFrame,
+ getStillFrame,
};
export type {