Comments (4)
myVideo and userVideo references are initialized to null via useRef(). Hence, myVideo.current and currentVideo.current are null, which is why you see the above error.
The solution is to assign a value to this reference which is done here.
See more details about setting reference via the refs property here.
from project_video_chat.
okk
from project_video_chat.
Heyy how did you fix it?
from project_video_chat.
just delete the part of this
{stream && () }
It's because your ref doesn't create before you run a streaming video.
from project_video_chat.
Related Issues (17)
- Camera is not working like mirror cam
- Uncaught Error: Connection failed. at n.value (index.js:699) at RTCPeerConnection.i._pc.onconnectionstatechange (index.js:118) index.js:699 HOT 1
- Error while running react app
- Only error , not work ! HOT 2
- Copy Your ID Button not working properly
- Cross Origin Issue HOT 1
- Right side video not coming HOT 3
- copy to clipboard refreshing the page and TypeErro at getUserMedia setting srcObject HOT 1
- getting this weird error " Error: Function components cannot have string refs. We recommend using useRef() instead" HOT 1
- How to deploy it? HOT 1
- how can i change it into a video conferencing web app? HOT 1
- Getting this error "Uncaught TypeError: Cannot read property 'renegotiate' of undefined" once I establish connection with myself
- Uncaught Error: Connection failed. HOT 2
- Unhandled Rejection (TypeError): myVideo.current is undefined HOT 5
- TypeError: userVideo.current is undefined HOT 1
- Error: Invalid hook call. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from project_video_chat.