Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  pc-video-size1.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/media/webrtc/tests/crashtests/pc-video-size1.html


<html class="reftest-wait">
<script>
document.addEventListener("DOMContentLoaded", async () => {
  SpecialPowers.wrap(document).notifyUserGestureActivation();
  let stream;
  try {
    stream = await navigator.mediaDevices.getDisplayMedia({
      video: {
        resizeMode: "crop-and-scale",
        width: 1,
        height: 1,
      },
    });
    const localVideo = document.createElement("video");
    document.body.appendChild(localVideo);
    localVideo.srcObject = stream;
    localVideo.style = "width:320px;height:240px;background-color:#000;";
    localVideo.play();

    const pc1 = new RTCPeerConnection();
    const pc2 = new RTCPeerConnection();
    for (const track of stream.getTracks()) {
      pc1.addTrack(track);
    }
    pc1.onicecandidate = e => pc2.addIceCandidate(e.candidate);
    pc2.onicecandidate = e => pc1.addIceCandidate(e.candidate);
    const trackPromise = new Promise(r => pc2.ontrack = r);
    await pc1.setLocalDescription();
    await pc2.setRemoteDescription(pc1.localDescription);
    await pc2.setLocalDescription();
    await pc1.setRemoteDescription(pc2.localDescription);
    const {track: remoteTrack} = await trackPromise;
    const remoteVideo = document.createElement("video");
    document.body.appendChild(remoteVideo);
    remoteVideo.srcObject = new MediaStream([remoteTrack]);
    remoteVideo.style = "width:320px;height:240px;background-color:#AAA;";
    remoteVideo.play();
    await new Promise(r => remoteVideo.onloadeddata = r);
  } catch(e) {
    dump(`##### ERROR ${e.name}: ${e.message}\n${e.stack}\n`);
  } finally {
    if (stream) {
      for (const track of stream.getTracks()) {
        track.stop();
      }
    }
    document.documentElement.removeAttribute("class");
  }
});
</script>
</html>

Messung V0.5 in Prozent
C=100 H=100 G=100

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002