MCPcopy Create free account
hub / github.com/cookpete/react-player / load

Function load

examples/react/src/App.tsx:37–45  ·  view source on GitHub ↗
(src?: string)

Source from the content-addressed store, hash-verified

35 const [state, setState] = useState<PlayerState>(initialState);
36
37 const load = (src?: string) => {
38 setState(prevState => ({
39 ...prevState,
40 src,
41 played: 0,
42 loaded: 0,
43 pip: false,
44 }));
45 };
46
47 const handlePlayPause = () => {
48 setState(prevState => ({ ...prevState, playing: !prevState.playing }));

Callers 1

renderLoadButtonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected