Last active
August 12, 2018 21:27
-
-
Save iha2/72c56d5ef19eb2fb5564d0366b1d1aaa to your computer and use it in GitHub Desktop.
A React component made to host a video element drawn on a canvas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<React.Fragment> | |
<video | |
ref={(videoElementRef: HTMLVideoElement) => | |
(videoElement = videoElementRef) | |
} | |
autoPlay={true} | |
playsInline={true} | |
muted={true} | |
style={{ visibility: 'hidden', position: 'fixed' }} | |
/> | |
<canvas | |
ref={(canvasElementRef: HTMLCanvasElement) => | |
(canvasElement = canvasElementRef) | |
} | |
/> | |
</React.Fragment> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment