tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

videoFrame-serialization.crossAgentCluster.helper.html (618B)


      1 <!DOCTYPE html>
      2 <html>
      3 <body>
      4 <p id='location'></p>
      5 <div id='log'></div>
      6 <script>
      7  document.querySelector('#location').innerHTML = window.origin;
      8  let received = new Map();
      9  window.onmessage = (e) => {
     10    let msg = e.data + ' (from ' + e.origin + ')';
     11    document.querySelector('#log').innerHTML += '<p>' + msg + '<p>';
     12    if (e.data.hasOwnProperty('id')) {
     13      e.source.postMessage(
     14        received.get(e.data.id) ? 'RECEIVED' : 'NOT_RECEIVED', '*');
     15      return;
     16    }
     17    if (e.data.toString() == '[object VideoFrame]') {
     18      received.set(e.data.timestamp, e.data);
     19    }
     20  };
     21 </script>
     22 </body>
     23 </html>