mirror of https://github.com/OpenVidu/openvidu.git
1 line
796 KiB
JavaScript
1 line
796 KiB
JavaScript
![]() |
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+27z":function(e,t){function n(e,t,n){var r={audio:!1,video:{mandatory:{chromeMediaSource:e?"screen":"desktop",maxWidth:window.screen.width>1920?window.screen.width:1920,maxHeight:window.screen.height>1080?window.screen.height:1080},optional:[]}};return n&&(r.audio={mandatory:{chromeMediaSource:e?"screen":"desktop"},optional:[]}),t&&(r.video.mandatory.chromeMediaSourceId=t,r.audio&&r.audio.mandatory&&(r.audio.mandatory.chromeMediaSourceId=t)),r}function r(e){i?i.isLoaded?i.contentWindow.postMessage(e?e.forEach?{captureCustomSourceId:e}:{captureSourceIdWithAudio:!0}:{captureSourceId:!0},"*"):setTimeout(function(){r(e)},100):o(function(){r(e)})}var i;function o(e){i?e():((i=document.createElement("iframe")).onload=function(){i.isLoaded=!0,e()},i.src="https://openvidu.github.io/openvidu-screen-sharing-chrome-extension/",i.style.display="none",(document.body||document.documentElement).appendChild(i))}function s(){i?i.isLoaded?i.contentWindow.postMessage({getChromeExtensionStatus:!0},"*"):setTimeout(s,100):o(s)}window.getScreenId=function(e,t){-1===navigator.userAgent.indexOf("Edge")||!navigator.msSaveOrOpenBlob&&!navigator.msSaveBlob?navigator.mozGetUserMedia?e(null,"firefox",{video:{mozMediaSource:"window",mediaSource:"window"}}):(window.addEventListener("message",function t(r){r.data&&(r.data.chromeMediaSourceId&&("PermissionDeniedError"===r.data.chromeMediaSourceId?e("permission-denied"):e(null,r.data.chromeMediaSourceId,n(null,r.data.chromeMediaSourceId,r.data.canRequestAudioTrack)),window.removeEventListener("message",t)),r.data.chromeExtensionStatus&&(e(r.data.chromeExtensionStatus,null,n(r.data.chromeExtensionStatus)),window.removeEventListener("message",t)))}),t?setTimeout(function(){r(t)},100):setTimeout(r,100)):e({video:!0})},window.getScreenConstraints=function(e){o(function(){getScreenId(function(t,n,r){r||(r={video:!0}),e(t,r.video)})})},window.getChromeExtensionStatus=function(e){navigator.mozGetUserMedia?e("installed-enabled"):(window.addEventListener("message",function t(n){n.data&&n.data.chromeExtensionStatus&&(e(n.data.chromeExtensionStatus),window.removeEventListener("message",t))}),setTimeout(s,100))},t.getScreenId=getScreenId},"+FKC":function(e,t,n){"use strict";t.__esModule=!0;var r=n("bDgZ");t.WebRtcStats=function(){function e(e){this.stream=e,this.webRtcStatsEnabled=!1,this.statsInterval=1,this.stats={inbound:{audio:{bytesReceived:0,packetsReceived:0,packetsLost:0},video:{bytesReceived:0,packetsReceived:0,packetsLost:0,framesDecoded:0,nackCount:0}},outbound:{audio:{bytesSent:0,packetsSent:0},video:{bytesSent:0,packetsSent:0,framesEncoded:0,nackCount:0}}}}return e.prototype.isEnabled=function(){return this.webRtcStatsEnabled},e.prototype.initWebRtcStats=function(){var e=this,t=localStorage.getItem("elastest-instrumentation");if(t){console.warn("WebRtc stats enabled for stream "+this.stream.streamId+" of connection "+this.stream.connection.connectionId),this.webRtcStatsEnabled=!0;var n=JSON.parse(t);return this.statsInterval=n.webrtc.interval,console.warn("localStorage item: "+JSON.stringify(n)),void(this.webRtcStatsIntervalId=setInterval(function(){e.sendStatsToHttpEndpoint(n)},1e3*this.statsInterval))}console.debug("WebRtc stats not enabled")},e.prototype.stopWebRtcStats=function(){this.webRtcStatsEnabled&&(clearInterval(this.webRtcStatsIntervalId),console.warn("WebRtc stats stopped for disposed stream "+this.stream.streamId+" of connection "+this.stream.connection.connectionId))},e.prototype.getSelectedIceCandidateInfo=function(){var e=this;return new Promise(function(t,n){e.getStatsAgnostic(e.stream.getRTCPeerConnection(),function(i){if(-1!==r.name.indexOf("Chrome")||-1!==r.name.indexOf("Opera")){var o=void 0,s=void 0,a=void 0,u={},l={};for(var c in i){var d=i[c];"localcandidate"===d.type?u[d.id]=d:"remotecandidate"===d.type?l[d.id]=d:"googCandidatePair"===d.type&&"true"===d.googActiveConnection&&(a=d,o=d.localCandidateId,s=d.remoteCandidateId)}var p=u[o];if(p){var h=e.stream.getLocalIceCandidateList().filter(function(e){return!!e.candidate&
|