(function(s){let f,g,c,n,u,d,h=C("cwid"),l,m=w();setTimeout(()=>{y()},m?0:4500);function w(){const{href:e=""}=window.location;return e.indexOf("troom/allCamera.html")>-1}function y(e){const t=window.localStorage.getItem("courseInfo");window.AgoraRTC||T("/design/designstatic/lib/AgoraRTC/AgoraRTCSDK-3.6.11.js?my_version="),n=AgoraRTC.createClient({mode:"live"}),m?b():A(),k()}function A(){try{navigator.mediaDevices.getUserMedia({video:!0,audio:!0}).then(e=>{e.getTracks()[0].stop(),liveObj.sendAvaCamera()}).catch(e=>{console.log("\u6444\u50CF\u5934\u68C0\u6D4B\u5931\u8D25:",e)})}catch(e){console.log("\u5524\u8D77\u5931\u8D25:",e)}}function T(e,t){$.ajax({url:e,cache:!0,async:!1,success:function(){t&&t()}})}function k(e){AgoraRTC.getDevices(function(t){let a=!1,o=!1;for(var i=0;i!==t.length;++i){var r=t[i];r.kind==="audioinput"?(u===""&&(u=r.deviceId),o=!0):r.kind==="videoinput"?(d===""&&(d=r.deviceId),a=!0):console.log("Some other kind of source/device: ",r)}})}function v(e={}){try{const a=`#remote_video_${e.getId()}`;$(a).length>0&&$(a).remove()}catch(t){console.log("\u7528\u6237\u79BB\u573A:",t)}}function b(){n.on("stream-subscribed",e=>{const t=e.stream,a=t.getId(),o=`remote_video_${a}`,r=(window.getAvaCameraList?getAvaCameraList():[]).filter(j=>j.uid===a);let I="";r.length>0&&(I=r[0].name||""),$(`#${o}`).length<1&&($("#myCamera").append(`
`),$(`#${o}`).append(`