mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
7d51ca8e91
--HG-- extra : transplant_source : %FE%A1%93%10%AE%86C%F7G%00%9B%E3Y%F7%08%DF%A26%1A%5B
29 lines
801 B
HTML
29 lines
801 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test audio element currentTime is correct when used as media source</title>
|
|
<script type="text/javascript" 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();
|
|
addLoadEvent(function() {
|
|
var context = new AudioContext();
|
|
var audio = new Audio("small-shot.ogg");
|
|
audio.load();
|
|
audio.addEventListener("playing", function (e) {
|
|
ok(this.currentTime == 0, "currentTime must be zero");
|
|
SimpleTest.finish();
|
|
});
|
|
audio.play();
|
|
|
|
var source = context.createMediaElementSource(audio);
|
|
source.connect(context.destination);
|
|
});
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|