<!DOCTYPEHTML>
<html>
<head>
<title>Bug 2035059 - ADTS duration via data: URL</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<audio id="a"></audio>
<script>
// ADTS has no per-stream duration in the header, so the demuxer estimates
// it from the resource length and falls into the same Infinity-latching
// path as plain CBR mp3 when the resource length isn't reported up front.
const SRC = "adts-cbr.aac";
const EXPECTED = 14.789872;
// The ADTS demuxer extrapolates duration from asmall sample of frame
// sizes, so the result for variable-rate AAC drifts ~8%. Allow a wide
// tolerance: this test's job is to catch the Infinity-latching regression,
// not the unrelated estimation accuracy.
ok(Number.isFinite(audio.duration), "data: URL ADTS duration should be finite, got " + audio.duration);
ok(Math.abs(audio.duration - EXPECTED) / EXPECTED < 0.15, "data: URL ADTS duration should be within 15% of " + EXPECTED + "s, got " + audio.duration);
});
</script>
</body>
</html>
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.25 Sekunden
(vorverarbeitet am 2026-09-28)
¤
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.