Giter Site home page Giter Site logo

Js library not working about js-docs HOT 7 CLOSED

eyeson-team avatar eyeson-team commented on July 28, 2024
Js library not working

from js-docs.

Comments (7)

alamgira avatar alamgira commented on July 28, 2024 1

hello yes i can join the meeting using eyeson url (one session with access key and the other one with guest token)
My localhost wasn't working and therefore i uploaded to my server with https support.

from js-docs.

alamgira avatar alamgira commented on July 28, 2024 1

It still didn't work with https @unused . The current failure i am talking about is on https

from js-docs.

alamgira avatar alamgira commented on July 28, 2024

Accepted is never called in event handler. I have joined to the meeting from another browser using guest token and eyeson url, still didn't receive "accepted" event.

from js-docs.

unused avatar unused commented on July 28, 2024

I've quickly tested your snippet and it seems to be fine, therefore it might be some issue with your development environment: Please ensure you use localhost for your local development as otherwise your browser of choice might require you to use HTTPS even for local development. Check if there are any error messages or warning received when starting the meeting in your browser. An easy way to test - and comfortable way to prevent meeting expiration - is to join a user and open the default eyeson web UI, then join another participant on the same room and use this access key for testing.

The HTML document I adapted from your code looks like the following. NOTE: I hosted it using a simple local webserver, e.g. using python python -m SimpleHTTPServer 8000 and visiting http://localhost:8000.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>testing https://github.com/eyeson-team/js-docs/issues/23</title>
  </head>
  <body>
    <form id="start-form">
      <label for="access-key">Access Key</label>
      <input type="text" id="access-key" />
      <button>start</button>
    </form>
    <video id="local-video" width="640" height="480" autoplay playsinline></video>
    <video id="remote-video" width="640" height="480" autoplay playsinline></video>

    <script src="./node_modules/eyeson/dist/eyeson.js"></script>
    <script>
      function addVideo(element, stream) {
        element.srcObject = stream;
        element.play();
      }

      let state = { local: null, stream: null, connecting: false, audio: true,
                    video: true, screen: false, facingMode: "user",recording :false,
                    streaming:false, youtube:false, facebook:false };
      var eyesonModule = window.eyeson;
      var eyeson = eyesonModule.default;

      var start = function(accessKey) {
        state.connecting = true;
        eyeson.onEvent(handleEvent);
        eyeson.start(accessKey);
      }

      function handleEvent(event) {
        console.debug('[App] Ignore received event:'+ event.type, event);

        if (event.type !== 'accept') {
          return;
        }

        var divLocal = document.getElementById("local-video");
        state.local = event.localStream;
        addVideo(divLocal, state.local);
        var divRemote = document.getElementById("remote-video");
        state.stream = event.remoteStream;
        addVideo(divRemote, state.stream);
        state.connecting = false;
      }

      document.getElementById("start-form")
        .addEventListener('submit', function(event) {
          event.preventDefault();
          event.stopPropagation();
          var accessKey = document.getElementById("access-key").value;
          console.debug("start meeting with:", accessKey);
          start(accessKey);
        });
    </script>

from js-docs.

unused avatar unused commented on July 28, 2024

I have joined to the meeting from another browser using guest token and eyeson url, still didn't receive "accepted" event.

Sorry I missed that one. Could you join the meeting with the eyeson web UI or did it fail as well?

from js-docs.

unused avatar unused commented on July 28, 2024

What error message are you receiving, can you check the logs? Did you test with the document provided?

from js-docs.

alamgira avatar alamgira commented on July 28, 2024

It is working now. it was https issue.

from js-docs.

Related Issues (20)

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.