Thanks for the pointers.... I have updated the incident with my findings....
For the benefit of the other members of the forum... I have created the following two JavaScript functions that work well for me. See below...
////////////////////////////////////////////////////////////////////////////////////////////////////
function muteMicrophone(bEnabled) {
console.log("-->>>> muteMicrophone = " + bEnabled);
if (oSipSessionCall != null) {
// console.log("-->>>> muteMicrophone-> oSipSessionCall is valid");
if (oSipSessionCall.o_session != null) {
// console.log("-->>>> muteMicrophone-> oSipSessionCall.o_session is valid");
if (oSipSessionCall.o_session.o_stream_local != null) {
// console.log("-->>>> muteMicrophone-> oSipSessionCall.o_session.o_stream_local is valid");
if (oSipSessionCall.o_session.o_stream_local.getAudioTracks().length > 0) {
// console.log("-->>>> muteMicrophone-> oSipSessionCall.o_session.o_stream_local->Audio Tracks Greater than 0");
for (var nTrack = 0; nTrack < oSipSessionCall.o_session.o_stream_local.getAudioTracks().length ; nTrack++) {
// console.log("-->>>> muteMicrophone-> Setting Audio Tracks [" + nTrack + "] to state = " + bEnabled);
oSipSessionCall.o_session.o_stream_local.getAudioTracks()[nTrack].enabled = bEnabled;
}
}
else {
console.log("-->>>> muteMicrophone-> oSipSessionCall.o_session.o_stream_local-> NO AUDIO TRACKS");
}
}
else {
console.log("-->>>> muteMicrophone-> oSipSessionCall.o_session.o_stream_local is NULL");
}
}
else {
console.log("-->>>> muteMicrophone-> oSipSessionCall.o_session is NULL");
}
}
else {
console.log("-->>>> muteMicrophone-> oSipSessionCall is NULL");
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
////////////////////////////////////////////////////////////////////////////////////////////////////
function muteWebCam(bEnabled)
{
console.log("-->>>> muteWebCam = " + bEnabled);
if (oSipSessionCall != null) {
// console.log("-->>>> muteWebCam-> oSipSessionCall is valid");
if (oSipSessionCall.o_session != null) {
// console.log("-->>>> muteWebCam-> oSipSessionCall.o_session is valid");
if (oSipSessionCall.o_session.o_stream_local != null) {
// console.log("-->>>> muteWebCam-> oSipSessionCall.o_session.o_stream_local is valid");
if (oSipSessionCall.o_session.o_stream_local.getVideoTracks().length > 0) {
// console.log("-->>>> muteWebCam-> oSipSessionCall.o_session.o_stream_local->Video Tracks Greater than 0");
for (var nTrack = 0; nTrack < oSipSessionCall.o_session.o_stream_local.getVideoTracks().length ; nTrack++) {
// console.log("-->>>> muteWebCam-> Setting Video Tracks [" + nTrack + "] to state = " + bEnabled);
oSipSessionCall.o_session.o_stream_local.getVideoTracks()[nTrack].enabled = bEnabled;
}
}
else {
console.log("-->>>> muteWebCam-> oSipSessionCall.o_session.o_stream_local-> NO VIDEO TRACKS");
}
}
else {
console.log("-->>>> muteWebCam-> oSipSessionCall.o_session.o_stream_local is NULL");
}
}
else {
console.log("-->>>> muteWebCam-> oSipSessionCall.o_session is NULL");
}
}
else {
console.log("-->>>> muteWebCam-> oSipSessionCall is NULL");
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////