Giter VIP home page Giter VIP logo

video-call-app-nodejs's People

Contributors

amirsanni avatar dependabot[bot] avatar kfrancmm avatar nikhil-js-dev avatar parag4787 avatar ranjit-git 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

video-call-app-nodejs's Issues

Facing issue when refresh a page feed call two time and display two feed of same user

<title>WebRTC Individual feed base on</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.min.js"></script> <script> const h = { getIceServer() { return { iceServers: [ { urls: [ "stun:stun.l.google.com:19302", "stun:global.stun.twilio.com:3478", ], }, ], }; }, getUserFullMedia() { return navigator.mediaDevices.getUserMedia({ video: true, audio: { echoCancellation: true, noiseSuppression: true, }, }); }, };
  function getPartnerNameFromUrl() {
    const pathSegments = window.location.pathname.split("/");
    return pathSegments[2];
  }

  (async function initWebRTC() {
    const partnerName = getPartnerNameFromUrl();
    if (!partnerName) {
      console.error("partnerName not found in URL");
      return;
    }
    let pc = new RTCPeerConnection(h.getIceServer());
    let socket = io("/stream");
    let username = "";
    let myStream = "";

    try {
      myStream = await h.getUserFullMedia();
      socket.emit("subscribe", {
        room: partnerName,
        username: username,
      });

      socket.on("newUserStart", (data) => {
        init(false, data.sender);
      });

      socket.on("ice candidates", async (data) => {
        if (data.candidate) {
          await pc.addIceCandidate(new RTCIceCandidate(data.candidate));
        }
      });

      socket.on("sdp", async (data) => {
        if (data.description.type === "offer") {
          await pc.setRemoteDescription(new RTCSessionDescription(data.description));
          myStream = await h.getUserFullMedia();
          myStream.getTracks().forEach((track) => {
            pc.addTrack(track, myStream);
          });
          let answer = await pc.createAnswer();
          await pc.setLocalDescription(answer);
          socket.emit("sdp", {
            description: pc.localDescription,
            to: data.sender,
            sender: username,
          });
        } else if (data.description.type === "answer") {
          // Ensure we're in the correct state to set the remote description
          if (pc.signalingState === "have-local-offer") {
            await pc.setRemoteDescription(new RTCSessionDescription(data.description));
          } else {
            console.error("Unexpected state for setting remote description:", pc.signalingState);
          }
        }
      });
    } catch (error) {
      console.error("Error initializing WebRTC:", error);
    }

    function init(createOffer, partnerName) {
      if (createOffer) {
        pc.onnegotiationneeded = async () => {
          let offer = await pc.createOffer();
          await pc.setLocalDescription(offer);
          socket.emit("sdp", {
            description: pc.localDescription,
            to: partnerName,
            sender: username,
          });
        };
      }

      pc.onicecandidate = ({ candidate }) => {
        socket.emit("ice candidates", {
          candidate: candidate,
          to: partnerName,
          sender: username,
        });
      };

      pc.ontrack = (e) => {
        displayRemoteStream(e.streams[0]);
      };
    }

    function displayRemoteStream(stream) {
      const existingVideo = document.querySelector(".remote-video");
      if (existingVideo) {
        existingVideo.srcObject = stream;
      } else {
        const partnerName = getPartnerNameFromUrl();
        const video = document.createElement("video");
        video.id = `${partnerName}-video`;
        video.srcObject = stream;
        video.autoplay = true;
        video.controls = true;
        video.className = "remote-video";
        const videoContainer = document.getElementById("videos");
        videoContainer.appendChild(video);
      }
    }
  })();
</script>

504 : Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Apache/2.4.41 (Ubuntu) Server at chat.1410inc.xyz Port 443

How many participant can be added in one room ?

I believe as this is a peer to peer communication there will be a limitation with the bandwidth and hence a number of participants allowed to be in a room?

If you have done the testing are you aware of how many can be allowed to be added in the room?
If I want to add such a limit that can be done on the server code. Correct me if I am wrong?

Regards,
Pravesh Bansal

Have to work for more than 4 person

Hi,
i found that its not working for more than 3 person in same room.
Even tested your demo link https://chat.1410inc.xyz..
When more than 3 person are connected then

  • same person is displayed multiple times
  • or video call of person get delayed

Sometime there is blank screen for room no video is displayed.
I tried to use in my project but not able to use.
Can you help ?

403 Forbidden: Socket.io

Screen Shot 2020-06-05 at 3 47 41 AM

Hello,

I followed all your instructions, but still not working on my server: https://letstalk.jmahuelgas.com/

  1. Clone the repo
  2. run npm install.
  3. Ensure domain has SSL
  4. New Ice server account

Note: I edited my document root folder permission into 777 and running on Apache.

Pleaase help in hybrid video conference app

Hello Amir, i followed your code from a long time, its so nice that u update projects time to time.

Amir i want to create a html5 css mobile hybrid app client of your nodejs conference app please guide.
Please explain what things are need to be port in mobile app and how to access socket server from remotely thru mobile device..
it may involve cors, how to bind cors to mobile app only..

please guide..

Error data.room

First run is ok. On reload script stop working. (Ubuntu. Chrome)

if ( socket.adapter.rooms[data.room].length > 1 ) {
                                             ^
TypeError: Cannot read properties of undefined (reading 'length')

have to work on local network

hello sir,

wonder full code , which i m looking for.. this is code working fine in localhost...

how could i change it to work between LAN

please help...

Not working in Iphone

Hello Sir/Medam,

We are checking demo on our mobiles and it is working in android devices but not working in Iphone(Mac os). So anyone please give me a solution.

Thanks.

heroku

Hello, sir
i am a student and want to test your app online.But when i tried to upload on heroku is gives error of logs.like npm start than npm crash

Trying to get in touch regarding a security issue

Hi there,

I couldn't find a SECURITY.md in your repository and am not sure how to best contact you privately to disclose a security issue.

Can you add a SECURITY.md file with an e-mail to your repository, so that our system can send you the vulnerability details? GitHub suggests that a security policy is the best way to make sure security issues are responsibly disclosed.

Once you've done that, you should receive an e-mail within the next hour with more info.

Thanks! (cc @huntr-helper)

File data communication

I am unable to pass the details of the newly added user from events.js to rtc.js and then to stream.js. I need to do to show the user names below the streaming videos of each user. I have tried everything, Can you please help me in achieving this. Maybe I might be asking silly thing but variable and values and communication amongst files, I found it difficult,

Setting up the video and audio mute before joining to a meeting and showing up name on the video panel

Hi amirsanni, I am really so thankful to you for your video calling app code. I am trying to make some features like, before joining a meeting a user can choose options for muting audio and video, and in the video chatting section the user name(the name is already saved while joining) will be shown up when hovering the video panel. I have been trying to make these for a few days but can not get any way to do it. Now I think you can help me out.

Mobile browser issue

Hello Mr. Author,
Thank you for a good sample. Can you please help with this issue.
It does not support iPhone mobile browser? Any solution for this, please.
Thank you.

Cross Browser is not working

Hi Amir,

I tried your code it seems cross-browser is not working with this code.

Firefox screenshot
image

Chrome Screenshot
image

Case 1 ) Both the user is joining through Chrome or Firefox is working
Case 2 ) Cross-Browser Application is not working

Could you guide me with this ?

Regards,
Pravesh Bansal

WSS handshake 400 error

Hi Amir,

Awesome project.

I am able to run the app on the same network but it seems that the connection is not being established on a remote server probably because the wss handshake is failing with 400 response. Please see the screenshot below:

Untitled

Thanks in anticipation.

Video Quality

Good day. Can we change client's video quality? And how?

Deployment

Hi
Your code is working very well, i tried to deploy in vercel now. Sh but am getting npm issue. Can you please tell about deployment. How to deploy and test the code in live

Video is not displaying while connected in Wifi

Hi Team,

I have used your code for video calling in my application. When i testing the application with wifi with other person the video of the second person is not visibling each other. But when we connect to the mobile network the video is displaying to each other. Let me know what will be the real issue on it.

Run via localhost

Hi good day, your project was awesome.

I tried your demo online, it was running smoothly. But, I intended to run in localhost. In my own machine is working fine, but when I network in a different machine (Windows 10, Updated Google chrome) it won't work as I assumed.

In the different machine, the error says that
"User media, not available".
backtrace:
at Object.getUserFullmedia(helper.js:65)
at getAndSetUserStream (rtc.js:108)
at rtc.js:37

How to implement in Android Native

I am Android Developer and i need the video call application.So, can you help me ?
I have setup on my server and working fine.

But how can i manage to android mobile can you help me which api and how to join room using android Application or How to join any port or socket the i will join the video conference in android mobile.

Thank amirsanni

working on domain

hi,
code working locally very fine, but when i hosted it to live server its not working video streaming of users are showing them.

like my video not showing to user2, and user2's video not showing me.
can you help me out.

thank you.

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.