1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3079],{3079:function(e,r,t){e.exports=t(78953)},78953:function(e,r,t){"use strict";var n,o,i=this&&this.__awaiter||function(e,r,t,n){return new(t||(t=Promise))(function(o,i){function u(e){try{a(n.next(e))}catch(e){i(e)}}function c(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var r;e.done?o(e.value):((r=e.value)instanceof t?r:new t(function(e){e(r)})).then(u,c)}a((n=n.apply(e,r||[])).next())})},u=this&&this.__generator||function(e,r){var t,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(t)throw TypeError("Generator is already executing.");for(;u;)try{if(t=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=r.call(e,u)}catch(e){i=[6,e],n=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(r,"__esModule",{value:!0}),r.ReactMediaRecorder=r.useReactMediaRecorder=r.RecorderErrors=void 0;var c=t(67294);function a(e){var r=this,t=e.audio,n=void 0===t||t,a=e.video,s=void 0!==a&&a,d=e.onStop,l=void 0===d?function(){return null}:d,f=e.onStart,p=void 0===f?function(){return null}:f,v=e.blobPropertyBag,b=e.screen,h=void 0!==b&&b,w=e.mediaRecorderOptions,y=void 0===w?null:w,R=e.customMediaStream,g=void 0===R?null:R,m=e.stopStreamsOnStop,E=void 0===m||m,_=e.askPermissionOnMount,k=void 0!==_&&_,M=(0,c.useRef)(null),S=(0,c.useRef)([]),T=(0,c.useRef)(null),O=(0,c.useState)("idle"),N=O[0],A=O[1],D=(0,c.useState)(!1),U=D[0],j=D[1],x=(0,c.useState)(null),C=x[0],B=x[1],L=(0,c.useState)("NONE"),P=L[0],V=L[1],q=(0,c.useCallback)(function(){return i(r,void 0,void 0,function(){var e,r,t;return u(this,function(o){switch(o.label){case 0:A("acquiring_media"),e={audio:"boolean"==typeof n?!!n:n,video:"boolean"==typeof s?!!s:s},o.label=1;case 1:if(o.trys.push([1,9,,10]),!g)return[3,2];return T.current=g,[3,8];case 2:if(!h)return[3,6];return[4,window.navigator.mediaDevices.getDisplayMedia({video:s||!0})];case 3:if((r=o.sent()).getVideoTracks()[0].addEventListener("ended",function(){H()}),!n)return[3,5];return[4,window.navigator.mediaDevices.getUserMedia({audio:n})];case 4:o.sent().getAudioTracks().forEach(function(e){return r.addTrack(e)}),o.label=5;case 5:return T.current=r,[3,8];case 6:return[4,window.navigator.mediaDevices.getUserMedia(e)];case 7:t=o.sent(),T.current=t,o.label=8;case 8:return A("idle"),[3,10];case 9:return V(o.sent().name),A("idle"),[3,10];case 10:return[2]}})})},[n,s,h]);(0,c.useEffect)(function(){if(!window.MediaRecorder)throw Error("Unsupported Browser");if(h&&!window.navigator.mediaDevices.getDisplayMedia)throw Error("This browser doesn't support screen capturing");var e=function(e){var r=navigator.mediaDevices.getSupportedConstraints(),t=Object.keys(e).filter(function(e){return!r[e]});t.length>0&&console.error("The constraints "+t.join(",")+" doesn't support on this browser. Please check your ReactMediaRecorder component.")};return"object"==typeof n&&e(n),"object"==typeof s&&e(s),y&&y.mimeType&&!MediaRecorder.isTypeSupported(y.mimeType)&&console.error("The specified MIME type you supplied for MediaRecorder doesn't support this browser"),!T.current&&k&&q(),function(){T.current&&T.current.getTracks().forEach(function(e){return e.stop()})}},[n,h,s,q,y,k]);var F=function(e){var r=e.data;S.current.push(r)},G=function(){p()},I=function(){var e=Object.assign({type:S.current[0].type},v||(s?{type:"video/mp4"}:{type:"audio/wav"})),r=new Blob(S.current,e),t=URL.createObjectURL(r);A("stopped"),B(t),l(t,r)},z=function(e){j(e),T.current&&T.current.getAudioTracks().forEac
1h(function(r){return r.enabled=!e})},H=function(){M.current&&"inactive"!==M.current.state&&(A("stopping"),M.current.stop(),E&&T.current&&T.current.getTracks().forEach(function(e){return e.stop()}),S.current=[])};return{error:o[P],muteAudio:function(){return z(!0)},unMuteAudio:function(){return z(!1)},startRecording:function(){return i(r,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:if(V("NONE"),T.current)return[3,2];return[4,q()];case 1:e.sent(),e.label=2;case 2:if(!T.current)return[3,5];if(!T.current.getTracks().some(function(e){return"ended"===e.readyState}))return[3,4];return[4,q()];case 3:e.sent(),e.label=4;case 4:if(!T.current.active)return[2];M.current=new MediaRecorder(T.current,y||void 0),M.current.ondataavailable=F,M.current.onstop=I,M.current.onstart=G,M.current.onerror=function(){V("NO_RECORDER"),A("idle")},M.current.start(),A("recording"),e.label=5;case 5:return[2]}})})},pauseRecording:function(){M.current&&"recording"===M.current.state&&(A("paused"),M.current.pause())},resumeRecording:function(){M.current&&"paused"===M.current.state&&(A("recording"),M.current.resume())},stopRecording:H,mediaBlobUrl:C,status:N,isAudioMuted:U,previewStream:T.current?new MediaStream(T.current.getVideoTracks()):null,previewAudioStream:T.current?new MediaStream(T.current.getAudioTracks()):null,clearBlobUrl:function(){C&&URL.revokeObjectURL(C),B(null),A("idle")}}}(n=o=r.RecorderErrors||(r.RecorderErrors={})).AbortError="media_aborted",n.NotAllowedError="permission_denied",n.NotFoundError="no_specified_media_found",n.NotReadableError="media_in_use",n.OverconstrainedError="invalid_media_constraints",n.TypeError="no_constraints",n.NONE="",n.NO_RECORDER="recorder_error",r.useReactMediaRecorder=a,r.ReactMediaRecorder=function(e){return e.render(a(e))}}}]); 2//# sourceMappingURL=3079.8e59700b24995668.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.