Giter Site home page Giter Site logo

adrianhajdin / project_video_chat Goto Github PK

View Code? Open in Web Editor NEW
807.0 13.0 380.0 1.74 MB

This is a code repository for the corresponding YouTube video. In this tutorial, we're going to build and deploy a React Video Chat Application using WebRTC.

JavaScript 93.69% HTML 3.45% CSS 2.72% Procfile 0.15%
react reactjs react-project webrtc

project_video_chat's Introduction

Realtime Chat Application

Video Chat

Introduction

This is a code repository for the corresponding video tutorial.

In this tutorial, we're going to build and deploy a React Video Chat Application using WebRTC.

Setup:

  • run npm i && npm start for both client and server side to start the development server

project_video_chat's People

Contributors

adrianhajdin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

project_video_chat's Issues

Error while running react app

Issues as like

react.development.js:1476 Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

  1. You might have mismatching versions of React and the renderer (such as React DOM)

  2. You might be breaking the Rules of Hooks

  3. You might have more than one copy of React in the same app
    See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
    at resolveDispatcher (react.development.js:1476:1)
    at Object.useContext (react.development.js:1484:1)
    at useTheme (useTheme.js:4:1)
    at useStyles (makeStyles.js:222:1)
    at WithStyles (withStyles.js:55:1)
    at renderWithHooks (react-dom.development.js:14985:1)
    at updateForwardRef (react-dom.development.js:17044:1)
    at beginWork (react-dom.development.js:19098:1)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)
    resolveDispatcher @ react.development.js:1476
    useContext @ react.development.js:1484
    useTheme @ useTheme.js:4
    useStyles @ makeStyles.js:222
    WithStyles @ withStyles.js:55
    renderWithHooks @ react-dom.development.js:14985
    updateForwardRef @ react-dom.development.js:17044
    beginWork @ react-dom.development.js:19098
    callCallback @ react-dom.development.js:3945
    invokeGuardedCallbackDev @ react-dom.development.js:3994
    invokeGuardedCallback @ react-dom.development.js:4056
    beginWork$1 @ react-dom.development.js:23964
    performUnitOfWork @ react-dom.development.js:22776
    workLoopSync @ react-dom.development.js:22707
    renderRootSync @ react-dom.development.js:22670
    performSyncWorkOnRoot @ react-dom.development.js:22293
    scheduleUpdateOnFiber @ react-dom.development.js:21881
    updateContainer @ react-dom.development.js:25482
    (anonymous) @ react-dom.development.js:26021
    unbatchedUpdates @ react-dom.development.js:22431
    legacyRenderSubtreeIntoContainer @ react-dom.development.js:26020
    render @ react-dom.development.js:26103
    ./src/index.js @ index.js:10
    options.factory @ react refresh:6
    webpack_require @ bootstrap:24
    (anonymous) @ startup:7
    (anonymous) @ startup:7
    react-dom.development.js:20085 The above error occurred in the <WithStyles(ForwardRef(AppBar))> component:

    at WithStyles (http://localhost:3000/static/js/bundle.js:44508:31)
    at div
    at App

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
logCapturedError @ react-dom.development.js:20085
update.callback @ react-dom.development.js:20118
callCallback @ react-dom.development.js:12318
commitUpdateQueue @ react-dom.development.js:12339
commitLifeCycles @ react-dom.development.js:20736
commitLayoutEffects @ react-dom.development.js:23426
callCallback @ react-dom.development.js:3945
invokeGuardedCallbackDev @ react-dom.development.js:3994
invokeGuardedCallback @ react-dom.development.js:4056
commitRootImpl @ react-dom.development.js:23151
unstable_runWithPriority @ scheduler.development.js:468
runWithPriority$1 @ react-dom.development.js:11276
commitRoot @ react-dom.development.js:22990
performSyncWorkOnRoot @ react-dom.development.js:22329
scheduleUpdateOnFiber @ react-dom.development.js:21881
updateContainer @ react-dom.development.js:25482
(anonymous) @ react-dom.development.js:26021
unbatchedUpdates @ react-dom.development.js:22431
legacyRenderSubtreeIntoContainer @ react-dom.development.js:26020
render @ react-dom.development.js:26103
./src/index.js @ index.js:10
options.factory @ react refresh:6
webpack_require @ bootstrap:24
(anonymous) @ startup:7
(anonymous) @ startup:7
react.development.js:1476 Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app
    See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
    at resolveDispatcher (react.development.js:1476:1)
    at Object.useContext (react.development.js:1484:1)
    at useTheme (useTheme.js:4:1)
    at useStyles (makeStyles.js:222:1)
    at WithStyles (withStyles.js:55:1)
    at renderWithHooks (react-dom.development.js:14985:1)
    at updateForwardRef (react-dom.development.js:17044:1)
    at beginWork (react-dom.development.js:19098:1)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)
    resolveDispatcher @ react.development.js:1476
    useContext @ react.development.js:1484
    useTheme @ useTheme.js:4
    useStyles @ makeStyles.js:222
    WithStyles @ withStyles.js:55
    renderWithHooks @ react-dom.development.js:14985
    updateForwardRef @ react-dom.development.js:17044
    beginWork @ react-dom.development.js:19098
    callCallback @ react-dom.development.js:3945
    invokeGuardedCallbackDev @ react-dom.development.js:3994
    invokeGuardedCallback @ react-dom.development.js:4056
    beginWork$1 @ react-dom.development.js:23964
    performUnitOfWork @ react-dom.development.js:22776
    workLoopSync @ react-dom.development.js:22707
    renderRootSync @ react-dom.development.js:22670
    performSyncWorkOnRoot @ react-dom.development.js:22293
    scheduleUpdateOnFiber @ react-dom.development.js:21881
    updateContainer @ react-dom.development.js:25482
    (anonymous) @ react-dom.development.js:26021
    unbatchedUpdates @ react-dom.development.js:22431
    legacyRenderSubtreeIntoContainer @ react-dom.development.js:26020
    render @ react-dom.development.js:26103
    ./src/index.js @ index.js:10
    options.factory @ react refresh:6
    webpack_require @ bootstrap:24
    (anonymous) @ startup:7
    (anonymous) @ startup:7
    manifest.json:1 Manifest: Line: 1, column: 1, Syntax error.

More Vital Issue:
react-dom.development.js:20085 The above error occurred in the <WithStyles(ForwardRef(AppBar))> component:

at WithStyles (http://localhost:3000/static/js/bundle.js:44508:31)
at div
at App

@adrianhajdin please look into this.

Error: Invalid hook call.

`Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

  1. You might have mismatching versions of React and the renderer (such as React DOM)
  2. You might be breaking the Rules of Hooks
  3. You might have more than one copy of React in the same app
    See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`

I'm getting this error in line client/src/App.js:36

Cross Origin Issue

CrossOrigin

I am facing cross origin Issue and I have code to do without cross origin but that is not working can you give your solution for your video chat code.

TypeError: userVideo.current is undefined

answerCall/<
~/src/SocketContext.js:45

42 | });
43 |
44 | peer.on('stream', (currentStream) => {

45 | userVideo.current.srcObject = currentStream;
| ^ 46 | });
47 |
48 | peer.signal(call.signal);

Only error , not work !

Cloned this library and tried in my local server but everytime I got error navigation.media....... undefined ! Unexpected error .

Uncaught Error: Connection failed.

With a clean clone of this repository, and changing the server to the local server running on port 5000. (The associated heroku app is dead), I see the following error when I attempt to call myself (Probably would be the same calling other people in production):

index.js:699 Uncaught Error: Connection failed.

I looked in: chrome://webrtc-internals/ and it appears that there is no connection being established over ice/stun?

Right side video not coming

I have tested a lot with even myvideo but the right side video does not seem to appear I have tried everything
I also wrote a js statement to see if the uservideo exists which comes out to be true

I am not able to view myvideo as well right side
it only appears if I refresh the page

Camera is not working like mirror cam

Hi, I tried this code and it's working but i am facing one issue , when I run this app locally its not showing camera like mirror . I clone your code and run on server locally and facing same issue on this code also.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.