Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/dom/media/test/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 2 kB image not shown  

Quelle  test_VideoPlaybackQuality.html

  Sprache: HTML
 

 products/Sources/formale Sprachen/C/Firefox/dom/media/test/test_VideoPlaybackQuality.html


<!DOCTYPE HTML>
<html>
<head>
  <title>Test basic functionality of VideoPlaybackQuality</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<pre id="test">
<script class="testbody" type="text/javascript">

SimpleTest.waitForExplicitFinish();

function test() {
  var video = document.createElement("video");
  ok(video.getVideoPlaybackQuality, "getVideoPlaybackQuality should be exposed with pref set");

  var vpq = video.getVideoPlaybackQuality();
  ok(vpq, "getVideoPlaybackQuality should return an object");
  ok(vpq.creationTime <= performance.now(), "creationTime should be in the past");
  is(vpq.totalVideoFrames, 0"totalVideoFrames should be 0");
  is(vpq.droppedVideoFrames, 0"droppedVideoFrames should be 0");

  var vpq2 = video.getVideoPlaybackQuality();
  ok(vpq !== vpq2, "getVideoPlaybackQuality should return a new object");
  ok(vpq.creationTime <= vpq2.creationTime, "VideoPlaybackQuality objects should have increasing creationTime");

  var audio = document.createElement("audio");
  ok(!audio.getVideoPlaybackQuality, "getVideoPlaybackQuality should not be available on Audio elements");

  video.src = "seek.webm";
  video.play();
  video.addEventListener("ended", function () {
    vpq = video.getVideoPlaybackQuality();
    ok(vpq.creationTime <= performance.now(), "creationTime should be in the past");
    ok(vpq.totalVideoFrames > 0"totalVideoFrames should be > 0");
    ok(vpq.droppedVideoFrames >= 0"droppedVideoFrames should be >= 0");
    ok(vpq.droppedVideoFrames <= vpq.totalVideoFrames, "droppedVideoFrames should be <= totalVideoFrames");

    SpecialPowers.pushPrefEnv({"set": [["media.video_stats.enabled", false]]}, function () {
      vpq = video.getVideoPlaybackQuality();
      is(vpq.creationTime, 0"creationTime should be 0");
      is(vpq.totalVideoFrames, 0"totalVideoFrames should be 0");
      is(vpq.droppedVideoFrames, 0"droppedVideoFrames should be 0");

      SimpleTest.finish();
    });
  });
}

addLoadEvent(function() {
  SpecialPowers.pushPrefEnv({"set":
    [
      ["media.mediasource.enabled", true],
    ]
  }, test);
});
</script>
</pre>
</body>
</html>

Messung V0.5 in Prozent
C=96 H=95 G=95

¤ Dauer der Verarbeitung: 0.17 Sekunden  (vorverarbeitet am  2026-06-10) ¤

*© 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.