-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Js library not working #23
Comments
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. |
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 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 <!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> |
Sorry I missed that one. Could you join the meeting with the eyeson web UI or did it fail as well? |
hello yes i can join the meeting using eyeson url (one session with access key and the other one with guest token) |
It still didn't work with https @unused . The current failure i am talking about is on https |
What error message are you receiving, can you check the logs? Did you test with the document provided? |
It is working now. it was https issue. |
Hello! Please ensure your meeting is not expired. Therefor only join a meeting if the participant is going to connect immediately, otherwise the meeting will expire after a short period of time. The meeting connected event is received as
accepted
, you can find this also in the getting started example in the documentation. The event received also provides thelocalStream
on demand, however please note that showing the local stream is only required when using SFU mode so you have to either disable SFU mode or remove the local stream having more than two participants. I'm not sure about your question starting a broadcast without stream but I guess you don't want the participant having to start it. You can create a generic user (that does not need to join) and use the access key to start an RTMP stream. Please double check that you have unique access keys for each participant and the meeting does not expire. The start method is the more convenient method as it does all initialization as well. Best wishes!Originally posted by @unused in #22 (comment)
This is my current javascript code for start
I am getting access key by using eyeson php library
Can you please guide me how to start the video conference from this state and also how will a participant join to this meeting from my site (not using eyeson link)
The text was updated successfully, but these errors were encountered: