I've added local video in 'index.js' using below mentioned code:
connection.onstreamL = function(event) {
connection.videosContainer = document.getElementById('localVideoDiv');
var video = document.getElementById('localVideo');
video.srcObject = event.stream;
var width = parseInt(connection.videosContainer.clientWidth);
var mediaElement = getHTMLMediaElement(video, {
/* title: event.userid,*/
buttons: ['full-screen'],
width:width
});
connection.videosContainer.appendChild(mediaElement);
mediaElement.id = event.streamid;
};
and html code in 'index.html' is like this:
<div class="patient-video" id="localVideoDiv">
<video loop muted autoplay poster="img/videoframe.jpg" class="" id="localVideo">
</video>
</div>
and try to toggle or hide this 'localVideo' or 'localVideoDiv' on click of button, but can't.
$(".preview").click(function(e) { $("#localVideo").slideToggle(); });
Kindly suggest some solution. Thanks in advance. Note: unable to adjust html code above. video tag is issuing in formating