1export const controller = () => { 2 const userMediaSupported = ('mediaDevices' in navigator) && ('getUserMedia' in navigator.mediaDevices); 3 const mediaCaptureSupported = 'capture' in document.createElement('input'); 4 const mediaRecorderSupported = 'MediaRecorder' in window; 5 6 const supported = !userMediaSupported && mediaCaptureSupported ? `Your device only supports recording of 7audio and video.` : `Your device supports live streaming and recording of audio and video.`; 8 9 let autoPipSupported = true; 10 try { 11 navigator.mediaSession.setActionHandler("enterpictureinpicture", () => {}); 12 } 13 catch(e) { 14 autoPipSupported = false; 15 } 16 17 if(autoPipSupported) { 18 document.querySelector('.auto-pip-supported').style.display = 'block'; 19 } 20 21 document.querySelector('#supported-info').innerText = supported; 22 23 if(!mediaRecorderSupported) { 24 document.querySelector('#mediarecorder-support').style.display = 'block'; 25 } 26}
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.