html 自动加入jitsi会议

ovfsdjhp  于 2022-12-09  发布在  其他
关注(0)|答案(3)|浏览(215)

我正在使用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>
7z5jn7bk

7z5jn7bk1#

我知道了,有一个选项叫做configOverwrite;你必须在里面加上这个

var options = {
                roomName: "RoomName",
                width: "100%",
                height: 1080,
                parentNode: document.querySelector("#meet"),
                configOverwrite: {
                    prejoinPageEnabled: false //This here
                },
...
...
pbpqsu0x

pbpqsu0x2#

另一种方法,只需在url中传递#config.prejoinPageEnabled =false,然后就完成了。

qyuhtwio

qyuhtwio3#

现在您应该通过:

configOverwrite: {
    prejoinConfig: {
        enabled: false
    }
}

相关问题