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

Quelle  test_SeekNoData_mp4.html

  Sprache: HTML
 

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


<!DOCTYPE HTML>
<html>
<head>
  <title>MSE: basic functionality</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <script type="text/javascript" src="mediasource.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();

runWithMSE(async (ms, el) => {
  el.controls = true;
  await once(ms, "sourceopen");
  ok(true, "Receive a sourceopen event");
  const audiosb = ms.addSourceBuffer("audio/mp4");
  const videosb = ms.addSourceBuffer("video/mp4");
  el.addEventListener("error", e => {
    ok(false, `should not fire ${e.type} event`);
    SimpleTest.finish();
  });
  is(el.readyState, el.HAVE_NOTHING, "readyState is HAVE_NOTHING");
  must_not_throw(() => el.currentTime = 3"setting currentTime is valid");
  is(el.currentTime, 3"currentTime is default playback start position");
  is(el.seeking, false, "seek not started with HAVE_NOTHING");
  await Promise.all([
    fetchAndLoad(audiosb, "bipbop/bipbop_audio", ["init"], ".mp4"),
    fetchAndLoad(videosb, "bipbop/bipbop_video", ["init"], ".mp4"),
    once(el, "loadedmetadata"),
  ]);
  const p = once(el, "seeking");
  el.play();
  el.currentTime = 5;
  is(el.readyState, el.HAVE_METADATA, "readyState is HAVE_METADATA");
  is(el.seeking, true, "seek not started with HAVE_METADATA");
  is(el.currentTime, 5"currentTime is seek position");
  await p;
  ok(true, "Got seeking event");
  await Promise.all([
    once(el, "seeked"),
    fetchAndLoad(audiosb, "bipbop/bipbop_audio", range(59), ".m4s"),
    fetchAndLoad(videosb, "bipbop/bipbop_video", range(610), ".m4s"),
  ]);
  ok(true, "Got seeked event");
  ok(el.currentTime >= 5"Time >= 5");
  ms.endOfStream();
  await once(el, "ended");
  SimpleTest.finish();
});

</script>
</pre>
</body>
</html>

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

¤ 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.