03b3640b514d6815e0bed1319cdec9383dae7c29
[WebKit-https.git] / LayoutTests / media / video-can-play-type.html
1 <html>
2     <head>
3         <style>
4             video { background-color: yellow; width: 320px; height: 240px;} 
5         </style>
6     </head>
7     <body>
8
9         <video controls ></video>
10
11         <p>Test HTMLMediaElement <em>canPlayType()</em> method.</p>
12
13         <script src=video-test.js></script>
14         <script>
15         
16             video = mediaElement = document.getElementsByTagName('video')[0];
17
18             testExpected("video.canPlayType()", "");
19             testExpected("video.canPlayType('video/')", "");
20             testExpected("video.canPlayType('video/blahblah')", "");
21             testExpected("video.canPlayType('video/mpeg; Codecs=\"avc1.4D400C\"')", "probably");
22             testExpected("video.canPlayType('        Video/MP4 ; CODECS=\"mp4v.20.8, mp4a.40.2\"')", "probably");
23             testExpected("video.canPlayType('audio/mpeg')", "maybe");
24             testExpected("video.canPlayType('audio/Wav')", "maybe");
25
26             endTest();
27         </script>
28     </body>
29 </html>