Replies: 1 comment
-
You can't, jsmpeg draws onto a canvas. There is no videoStream. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, any idea how can i replace < canvas ref={ canvas } /> with < vide></ video> ?
import React, { useRef, useEffect } from 'react';
import ReactDOM from 'react-dom';
import { loadPlayer } from 'rtsp-relay/browser';
function App() {
const canvas = useRef(null);
useEffect(() => {
if (!canvas.current) throw new Error('Ref is null');
}, []);
return (
< div>
{' '}
< div>
< canvas ref ={ canvas} />
< / div>
< video>< / video >
< / div>
);
}
export default App;
Beta Was this translation helpful? Give feedback.
All reactions