OLD | NEW |
| (Empty) |
1 <html> | |
2 <head> | |
3 <script> | |
4 // Issue a bunch of seeks in a row, with some overlap. | |
5 var seekCount = 0; | |
6 function seeked() { | |
7 if (++seekCount == 100) | |
8 document.title = 'Done'; // Signals completion to the C++ side. | |
9 var a = document.querySelector('audio'); | |
10 a.currentTime = Math.random() * a.duration; | |
11 window.setTimeout(seeked, 1); // Overlaps the onseeked listener. | |
12 } | |
13 </script> | |
14 </head> | |
15 <body> | |
16 Test that rapid seeking fails to crash the browser. | |
17 | |
18 <audio controls autoplay src="bear_pcm.wav" | |
19 onseeked="seeked()" onplaying="seeked()" onended="seeked()"></audio> | |
20 </body> | |
21 </html> | |
OLD | NEW |