I am working on integrating easyrtc on my system. Currently I am able to make audio and video calls. But after some time I can hear my own voice and there is a significant delay. I checked in chrome with chrome:webrtc-internals
, and there seems to be no input in echo cancellation technology. How can I enable it?
Thank you. If there is anything more required
Our integration code :
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ page session="true" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<!DOCTYPE html>
<html lang="de">
<head>
<jsp:include page="../common/meta.jsp"/>
<title> <spring:message code="meta.title.videochat"/></title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/easyrtc.css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/resources/css/jquery-ui.css">
</head>
<body class="stream-view">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script>
if (typeof jQuery == 'undefined') {
document.write(unescape("%3Cscript src='/resources/js/plugins/jquery-2.1.4.min.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>
<script type="text/javascript" src="https://www.OUR_APP.com:PORT/socket.io/socket.io.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/plugins/easyrtc/easyrtc.js?version=${appVersionNumber}"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/resources/plugins/easyrtc/easyrtc_rates.js?version=${appVersionNumber}"></script>
var activeBox = -1; // nothing selected
var aspectRatio = 4/3; // standard definition video aspect ratio
var maxCALLERS = 5;
var numVideoOBJS = maxCALLERS;
var layout;
var microphone = true;
var camera = true;
var getURLParameter = function(name){
if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search))
return decodeURIComponent(name[1]);
};
var personal = getURLParameter("p");
var group = getURLParameter("g");
easyrtc.setSocketUrl("https://www.OUR_APP.com:PORT");
easyrtc.dontAddCloseButtons(true);
"Noise cancellation" and "Can hear my own voice" are different things.
The first is known as Noise Suppression. The latter is known as AEC (acoustic echo cancellation).
In Chrome you can set them by specifying mediaConstraints, but i think that they are turned on by default:
var mediaConstraints = {
audio: {
echoCancellation: { exact: true },
googEchoCancellation: { exact: true},
googAutoGainControl: { exact: true},
googNoiseSuppression: { exact: true},
}
}
In Firefox you need to use the "moz" prefix instead of "goog".