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


Quelle  test_seamless_looping_duration.html   Sprache: HTML

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


<!DOCTYPE HTML>
<html>
<head>
<title>Seamless looping test duration</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="text/javascript" src="manifest.js"></script>
</head>
<script type="application/javascript">

/**
 * This test aims to check that the media duration shouldn't be changed during
 * seamless looping.
 */
add_task(async function testSeamlessLoopingDuration() {
  info(`create video and play it`);
  let video = document.createElement('video');
  video.loop = true;
  video.src = "gizmo-short.mp4";
  document.body.appendChild(video);
  await video.play();

  video.ondurationchange =
      _ => ok(false, "shouldn't change duration during looping!");

  info(`test seamless looping multiples times`);
  let MAX_LOOPING_COUNT = 10;
  for (let count = 0; count < MAX_LOOPING_COUNT; count++) {
    await once(video"seeking");
    await once(video"seeked");
    ok(true, `the round ${count} of the seamless looping succeeds`);
  }
});

// This one tests the situation where both tracks reached EOS before entering
// looping state.
add_task(async function testSeamlessLoopingDuration2() {
  info(`create video and play it to the end`);
  let video = document.createElement('video');
  video.src = "gizmo-short.mp4";
  document.body.appendChild(video);
  await video.play();
  await once(video"ended");

  info(`play video again`);
  video.ondurationchange =
      _ => ok(false, "shouldn't change duration during looping!");
  video.loop = true;
  await video.play();

  info(`test seamless looping multiples times`);
  let MAX_LOOPING_COUNT = 10;
  for (let count = 0; count < MAX_LOOPING_COUNT; count++) {
    await once(video"seeking");
    await once(video"seeked");
    ok(true, `the round ${count} of the seamless looping succeeds`);
  }
});

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

Messung V0.5
C=97 H=94 G=95

¤ Dauer der Verarbeitung: 0.21 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

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

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge