我使用Jitsi Meet iframe Api来实现自定义视频通话功能。它正在按预期工作。不过,我想在此添加一个功能。该功能是在http加载时自动加入或自动启动会议。如何做到这一点,而不是用户手动按下加入按钮?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src='https://meet.jit.si/external_api.js'></script>
<script>
$(document).ready(function () {
var domain = "meet.jit.si";
var options = {
roomName: "TestingMeet",
width: "100%",
height: 1080,
parentNode: document.querySelector("#meet"),
configOverwrite: {
},
interfaceConfigOverwrite: {
DEFAULT_BACKGROUND: "#3b98ff",
noSsl: true,
SHOW_JITSI_WATERMARK: false,
HIDE_DEEP_LINKING_LOGO: true,
SHOW_BRAND_WATERMARK: false,
SHOW_WATERMARK_FOR_GUESTS: false,
SHOW_POWERED_BY: false,
TOOLBAR_BUTTONS: [
'microphone', 'camera', 'closedcaptions', 'desktop', 'fullscreen',
'fodeviceselection', 'hangup', 'profile', 'recording',
'livestreaming', 'etherpad', 'sharedvideo', 'settings', 'raisehand',
'videoquality', 'filmstrip', 'feedback', 'stats', 'shortcuts',
'tileview'
],
}
}
var api = new JitsiMeetExternalAPI(domain, options);
api.executeCommands({
displayName: ['nickname'],
toggleVideo: [],
toggleAudio: []
});
});
</script>
<style>
.title {
text-align: center;
font-family: "Segoe UI";
font-size: 48px;
}
</style>
</head>
<body>
<div id="meet"></div>
</body>
</html>
我得到了它,有一个名为configOverwrite的选项;你必须在里面加上这个:
var options = {
roomName: "RoomName",
width: "100%",
height: 1080,
parentNode: document.querySelector("#meet"),
configOverwrite: {
prejoinPageEnabled: false //This here
},
...
...
另一种方法,只需在url中传递#config.prejinPageEnabled=false即可。
现在您应该通过:
configOverwrite: {
prejoinConfig: {
enabled: false
}
}