Skip to content

Commit

Permalink
preload audio for playback on unmute
Browse files Browse the repository at this point in the history
  • Loading branch information
UmungoBungo committed Oct 15, 2024
1 parent 2902722 commit 57d7ff9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/docs/src/components/Demo/Demo.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import {useColorMode} from '@docusaurus/theme-common';
import type {PlayerRef} from '@remotion/player';
import {Player} from '@remotion/player';
import {preloadAudio} from '@remotion/preload';
import React, {
type CSSProperties,
useCallback,
useEffect,
useRef,
useState,
} from 'react';
import {staticFile} from 'remotion';
import type {LocationAndTrending} from '../../remotion/HomepageVideo/Comp';
import {
HomepageVideoComp,
Expand Down Expand Up @@ -135,6 +137,8 @@ export const Demo: React.FC = () => {
}));
};

preloadAudio(staticFile('Utope-nature-5s.mp3'));

return (
<div>
<br />
Expand Down

0 comments on commit 57d7ff9

Please sign in to comment.