我正在我的网站内实现缩放会议。我使用缩放会议SDK。一切都很好,但DOM只是附加在关闭的</html>
标记上方。然而,在我看来,我已经按照缩放指令定义了DOM。
我使用Codeigniter,jQuery。下面是我的代码
//This is view
<div id="meetingSDKElement"></div>
//This is footer
<script src="https://source.zoom.us/2.18.2/lib/vendor/react.min.js"></script>
<script src="https://source.zoom.us/2.18.2/lib/vendor/react-dom.min.js"></script>
<script src="https://source.zoom.us/2.18.2/lib/vendor/redux.min.js"></script>
<script src="https://source.zoom.us/2.18.2/lib/vendor/redux-thunk.min.js"></script>
<script src="https://source.zoom.us/2.18.2/lib/vendor/lodash.min.js"></script>
<script src="https://source.zoom.us/zoom-meeting-2.18.2.min.js"></script>
<script type="text/javascript" src="<?php echo base_url('assets/js/client-view.js'); ?>?v=<?php echo VERSION; ?>"></script>
//This is Javascript
$(document).ready(function(){
getSignature();
});
function getSignature() {
fetch(authEndpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
meetingNumber: meetingNumber,
role: role,
password:passWord
})
}).then((response) => {
return response.json()
}).then((data) => {
console.log(data)
startMeeting(data.signature)
}).catch((error) => {
console.log(error)
})
}
function startMeeting(signature) {
$(".meeting-loader").css("visibility", "hidden");
document.getElementById('zmmtg-root').style.display = 'block'
ZoomMtg.init({
leaveUrl: leaveUrl,
success: (success) => {
console.log(success)
ZoomMtg.join({
signature: signature,
sdkKey: sdkKey,
meetingNumber: meetingNumber,
passWord: passWord,
userName: userName,
userEmail: userEmail,
tk: registrantToken,
zak: zakToken,
success: (success) => {
console.log(success)
},
error: (error) => {
console.log(error)
},
})
},
error: (error) => {
console.log(error)
}
})
}
字符串
我想把zmmtg-root
附加到meetingSDKElement
里面。
1条答案
按热度按时间yhuiod9q1#
Zoom Developer Advocate here.由于Zoom Meeting SDK web Client View被设计为占据整个页面,因此它不支持附加到给定的HTML元素。
但是,有两种方法可以将Meeting SDK附加到给定的HTML元素中:
字符串
1.使用Meeting SDK web Component View,它被设计为附加在给定的HTML元素中:
有关Zoom Developer Platform的特定问题,请随时在Zoom devforum上提问。