Code Monkey home page Code Monkey logo

Comments (5)

adarsh-chakraborty avatar adarsh-chakraborty commented on July 30, 2024

Did you find any solution?

from project_video_chat.

dynamo58 avatar dynamo58 commented on July 30, 2024

Don't know if this is still relevant, but this worked for me:

With the default boilerplate generated by create-react-app I had something like this in my index client file

import ReactDOM from 'react-dom/client';
import './styles/index.css';
import App from './App';
import { ContextProvider } from './Context';

const root = ReactDOM.createRoot(
  document.getElementById('root') as HTMLElement
);
root.render(
  <ContextProvider>
    <App />
  </ContextProvider>
);

I changed this to match the video and turned it into

import ReactDOM from 'react-dom';
import './styles/index.css';
import App from './App';

import { ContextProvider } from './Context';

ReactDOM.render(
  <ContextProvider>
    <App />
  </ContextProvider>,
  document.getElementById('root') as HTMLElement
);

I am absolutely oblivious as to why this fixes the issue, but it did for me.

from project_video_chat.

OkezeKingsley avatar OkezeKingsley commented on July 30, 2024

I'm currently facing as issue with this. The project isn't working because of this, I've tried multiple ways, but still haven't gotten a better solution.😤

from project_video_chat.

gihev72 avatar gihev72 commented on July 30, 2024

try this, it may help🫥

`
useEffect(()=>{

const getMd = async () => {
    const currentStream = await navigator.mediaDevices.getUserMedia({video: true, audio: true});
    setStream(currentStream);
    myVideo.current.srcObject = currentStream;
}

(async ()=> await getMd())();
// getMd()

socket.on("me", (id)=> setMe(id))

socket.on("calluser", ({from, name:callerName, signal})=>{
  setCall({isReceiveCall: true, from, name: callerName, signal})
})

}, []);
`

from project_video_chat.

OkezeKingsley avatar OkezeKingsley commented on July 30, 2024

from project_video_chat.

Related Issues (17)

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.