[jitsi-users] Can't mute audio or video with embed api


#1

Hello,

I have embed the api jitsi meet in my project. I can mute audio and video with the button which is integrated in the api, but if I try to execute the commands « toggleAudio » or « toggleVideo », I have the following errors :

[cid:image003.jpg@01D1F7AD.A6411120]

Bellow you can see part of my JS code :

var domain = "meet.jit.si";
var room = '1234';
var width = "100%";
var height = "100%";
var htmlElement = document.getElementById("videoconf-container");
var configOverwrite = {enableSimulcast: true};
var interfaceConfigOverwrite = {filmStripOnly: false};
var api = new JitsiMeetExternalAPI(domain, room, width, height, htmlElement, configOverwrite, interfaceConfigOverwrite);

and then :

$(document).on("click", "#home-video", function() {
               api.executeCommand('toggleVideo', []);
});

$(document).on("click", "#home-mute", function() {
               api.executeCommand('toggleAudio', []);
});

Can you help me, please ? What can I do to fix it ?

Thank you.

Sébastien


#2

Hi,

Does someone have any idea to resolve my issue ?

Thanks
Sébastien

···

De : users [mailto:users-bounces@jitsi.org] De la part de Sébastien Massenet
Envoyé : mardi 16 août 2016 11:02
À : users@jitsi.org
Objet : [jitsi-users] Can't mute audio or video with embed api

Hello,

I have embed the api jitsi meet in my project. I can mute audio and video with the button which is integrated in the api, but if I try to execute the commands « toggleAudio » or « toggleVideo », I have the following errors :

[cid:image001.jpg@01D2021E.00EA3870]

Bellow you can see part of my JS code :

var domain = "meet.jit.si";
var room = '1234';
var width = "100%";
var height = "100%";
var htmlElement = document.getElementById("videoconf-container");
var configOverwrite = {enableSimulcast: true};
var interfaceConfigOverwrite = {filmStripOnly: false};
var api = new JitsiMeetExternalAPI(domain, room, width, height, htmlElement, configOverwrite, interfaceConfigOverwrite);

and then :

$(document).on("click", "#home-video", function() {
               api.executeCommand('toggleVideo', []);
});

$(document).on("click", "#home-mute", function() {
               api.executeCommand('toggleAudio', []);
});

Can you help me, please ? What can I do to fix it ?

Thank you.

Sébastien