OLD | NEW |
1 <html> | 1 <html> |
2 <title>Test of concurrent HTML5 audio</title> | 2 <title>Test of concurrent HTML5 audio</title> |
3 <body> | 3 <body> |
4 | 4 |
5 <p>Test that multiple audio elements can play concurrently.</p> | 5 <p>Test that multiple audio elements can play concurrently.</p> |
6 | 6 |
7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | 7 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 |
8 (Please avoid writing new tests using video-test.js) --> | 8 (Please avoid writing new tests using video-test.js) --> |
9 <script src=video-test.js></script> | 9 <script src=video-test.js></script> |
10 <script src=media-file.js></script> | 10 <script src=media-file.js></script> |
11 <script> | 11 <script> |
12 var maxPlayers = 2; // Number of concurrent audio elements to test. For
larger values a longer media file is needed. | 12 var maxPlayers = 2; // Number of concurrent audio elements to test. For
larger values a longer media file is needed. |
13 var audioElementCount = 0; | 13 var audioElementCount = 0; |
14 | 14 |
15 function errorListener(event) | 15 function errorListener(event) |
16 { | 16 { |
17 logResult(false, "Element " + audioElementCount + " caught 'error'
event, audio.error.code = " + this.error.code); | 17 logResult(false, "Element " + audioElementCount + " caught 'error'
event, audio.error.code = " + this.error.code); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 consoleWrite("Starting a total of " + maxPlayers + " concurrent audio el
ements."); | 64 consoleWrite("Starting a total of " + maxPlayers + " concurrent audio el
ements."); |
65 for (var i = 0; i < maxPlayers; i++) | 65 for (var i = 0; i < maxPlayers; i++) |
66 document.write("<audio controls></audio>"); | 66 document.write("<audio controls></audio>"); |
67 | 67 |
68 testAudioElement(0); | 68 testAudioElement(0); |
69 </script> | 69 </script> |
70 | 70 |
71 </body> | 71 </body> |
72 </html> | 72 </html> |
OLD | NEW |