").attr({id:id,src:file,type:'text/javascript'}).appendTo(jQuery('body'))} function handleHostJS(){if(typeof window.roleFromAudienceToHost!='undefined'){var scriptList=[{src:jQuery("script#wp-agora-io-agora-deviceTest-js-js").attr('src'),id:"wp-agora-io-agora-deviceTest-js-js"},{src:jQuery("script#wp-agora-io-agora-stream-audioErr-js").attr('src'),id:"wp-agora-io-agora-stream-audioErr-js"},];reload(scriptList)}} async function createTmpCameraStream(uid,hasVideo){await handleHostJS();const localStream=AgoraRTC.createStream({streamID:uid,audio:!0,video:hasVideo,screen:!1});localStream.setVideoProfile(window.cameraVideoProfile);localStream.on("accessAllowed",function(){if(window.devices.cameras.length===0&&window.devices.mics.length===0){AgoraRTC.Logger.info('[DEBUG] : checking for cameras & mics');window.AGORA_UTILS.getCameraDevices();window.AGORA_UTILS.getMicDevices()} AgoraRTC.Logger.info("accessAllowed");if(!hasVideo){const msg={text:"USER_JOINED_WITHOUT_PERMISSIONS",messageType:"TEXT"} console.log('sending message') window.AGORA_RTM_UTILS.sendChannelMessage(msg,cb)}});localStream.on("accessDenied",function(){AgoraRTC.Logger.warning("accessDenied")});localStream.init(function(){AgoraRTC.Logger.info('getUserMedia successfully');if(window.channel_type=='broadcast'){localStream.play('full-screen-video')}else{localStream.play('local-video')} window.localStreams.tmpCameraStream=localStream;jQuery('#buttons-container').fadeIn()},function(err){AgoraRTC.Logger.error('[ERROR] : getUserMedia failed',err);if(err.msg==='NotAllowedError'){const msg={text:"USER_JOINED_WITHOUT_PERMISSIONS**"+uid,messageType:"TEXT"} window.AGORA_RTM_UTILS.sendChannelMessage(msg) window.AGORA_COMMUNICATION_UI.enableExit() window.AGORA_UTILS.showPermissionsModal()}})} function raiseHandRequestsContent(){let html="
コメント