Skip to content

Commit

Permalink
chore(demo): make active video element available on window.v
Browse files Browse the repository at this point in the history
  • Loading branch information
martinstark committed Sep 17, 2024
1 parent 9132248 commit ef77416
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/demo/player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ export const Player = ({ videoUrl, engine }: PlayerOptions) => {
return v;
}, [videoUrl, engine]);

useEffect(() => {
// @ts-ignore
window.v = video;
}, [video]);

// insert video in container
useEffect(() => {
if (!videoContainerRef.current) return;
Expand Down

0 comments on commit ef77416

Please sign in to comment.