!function(){try{var e=window.__SCREENITY_KEEPALIVE=window.__SCREENITY_KEEPALIVE||{};e.startedAt=Date.now();try{performance.mark("screenity-keepalive-start")}catch(e){}try{var t=window.AudioContext||window.webkitAudioContext;if(t&&!e.audioCtx){var n=new t,i=n.createOscillator(),a=n.createGain();i.type="sine",i.frequency.value=2e4,a.gain.value=1e-4,i.connect(a),a.connect(n.destination),i.start(),"running"!==n.state&&n.resume().catch(function(){}),e.audioCtx=n,e.oscillator=i}}catch(e){}try{if(navigator.locks&&!e.lockAbort){var c=new AbortController;e.lockAbort=c,navigator.locks.request("screenity-recorder-keepalive",{mode:"exclusive",signal:c.signal},function(){return new Promise(function(){})}).catch(function(){})}}catch(e){}try{if("function"==typeof RTCPeerConnection&&!e.priorityPc1){var r=document.createElement("canvas");r.width=2,r.height=2;var o=r.getContext("2d");o&&o.fillRect(0,0,2,2);var d=r.captureStream?r.captureStream(0):null,s=d?d.getVideoTracks()[0]:null;if(s){var u=new RTCPeerConnection,l=new RTCPeerConnection;e.priorityPc1=u,e.priorityPc2=l,e.priorityCanvas=r,e.priorityTrack=s,u.onicecandidate=function(e){e.candidate&&l.addIceCandidate(e.candidate).catch(function(){})},l.onicecandidate=function(e){e.candidate&&u.addIceCandidate(e.candidate).catch(function(){})},u.addTrack(s,d),u.createOffer().then(function(e){return u.setLocalDescription(e).then(function(){return l.setRemoteDescription(e)})}).then(function(){return l.createAnswer()}).then(function(e){return l.setLocalDescription(e).then(function(){return u.setRemoteDescription(e)})}).catch(function(){}),e.priorityTick=setInterval(function(){try{if(o&&(o.fillStyle="#000"===o.fillStyle?"#001":"#000",o.fillRect(0,0,2,2)),d&&"function"==typeof d.getVideoTracks){var e=d.getVideoTracks()[0];e&&"function"==typeof e.requestFrame&&e.requestFrame()}}catch(e){}},2e3)}}}catch(e){}try{if(navigator.mediaSession&&!e.mediaSession){"function"==typeof window.MediaMetadata&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:"stepvideo recording",artist:"stepvideo"})),navigator.mediaSession.playbackState="playing";try{navigator.mediaSession.setActionHandler("pause",function(){})}catch(e){}e.mediaSession=!0}}catch(e){}e.completedAt=Date.now();try{performance.mark("screenity-keepalive-end")}catch(e){}}catch(e){}}();