Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
jitsi-meet/libs/strophe/strophe.jingle.sessionbase.js

46 lines
1.1 KiB

/**
* Base class for ColibriFocus and JingleSession.
* @param connection Strophe connection object
* @constructor
*/
function SessionBase(connection){
this.connection = connection;
this.peerconnection
= new TraceablePeerConnection(
connection.jingle.ice_config,
connection.jingle.pc_constraints);
}
SessionBase.prototype.modifySources = function() {
var self = this;
this.peerconnection.modifySources(function(){
$(document).trigger('setLocalDescription.jingle', [self.sid]);
});
};
SessionBase.prototype.addSource = function (elem) {
this.peerconnection.addSource(elem);
this.modifySources();
};
SessionBase.prototype.removeSource = function (elem) {
this.peerconnection.removeSource(elem);
this.modifySources();
};
// SDP-based mute by going recvonly/sendrecv
// FIXME: should probably black out the screen as well
SessionBase.prototype.hardMuteVideo = function (muted) {
this.peerconnection.hardMuteVideo(muted);
this.connection.jingle.localVideo.getVideoTracks().forEach(function (track) {
track.enabled = !muted;
});
};