Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles
Last updated on : 2023-03-20
WebM is a multimedia format designed to provide a royalty-free, high-quality open video compression format for use with HTML5 video. WebM supports the video codec VP8 and VP9 as well as Vorbis, FLAC and Matroska.
encrypted-media-can-play-type-webm.html
Source:encrypted-media-can-play-type-webm.html
...8 <script src=../video-test.js></script>9 <script>10 video = mediaElement = document.getElementsByTagName('video')[0];11 consoleWrite("WebM video container without a codec results in \"maybe\".");12 testExpected("video.canPlayType('video/webm')", "maybe");13 testExpected("video.canPlayType('video/webm', '')", "maybe");14 testExpected("video.canPlayType('video/webm', null)", "maybe");15 testExpected("video.canPlayType('video/webm', undefined)", "maybe");16 testExpected("video.canPlayType('video/webm', 'webkit-org.w3.clearkey')", "maybe");17 testExpected("video.canPlayType('video/webm', 'WeBkIt-OrG.W3.ClEaRkEy')", "maybe");18 testExpected("video.canPlayType('video/webm', 'com.example.invalid')", "");19 consoleWrite("<br>WebM video container with a valid codec results in \"probably\".");20 testExpected("video.canPlayType('video/webm; codecs=\"vp8\"')", "probably");21 testExpected("video.canPlayType('video/webm; codecs=\"vp8\"', '')", "probably");22 testExpected("video.canPlayType('video/webm; codecs=\"vp8\"', null)", "probably");23 testExpected("video.canPlayType('video/webm; codecs=\"vp8\"', undefined)", "probably");24 testExpected("video.canPlayType('video/webm; codecs=\"vp8\"', 'webkit-org.w3.clearkey')", "probably");25 testExpected("video.canPlayType('video/webm; codecs=\"vp8\"', 'WeBkIt-OrG.W3.ClEaRkEy')", "probably");26 testExpected("video.canPlayType('video/webm; codecs=\"vp8\"', 'com.example.invalid')", "");27 consoleWrite("<br>WebM video container with two valid codecs result in \"probably\".");28 testExpected("video.canPlayType('video/webm; codecs=\"vp8, vorbis\"')", "probably");29 testExpected("video.canPlayType('video/webm; codecs=\"vp8, vorbis\"', '')", "probably");30 testExpected("video.canPlayType('video/webm; codecs=\"vp8, vorbis\"', null)", "probably");31 testExpected("video.canPlayType('video/webm; codecs=\"vp8, vorbis\"', undefined)", "probably");32 testExpected("video.canPlayType('video/webm; codecs=\"vp8, vorbis\"', 'webkit-org.w3.clearkey')", "probably");33 testExpected("video.canPlayType('video/webm; codecs=\"vp8, vorbis\"', 'WeBkIt-OrG.W3.ClEaRkEy')", "probably");34 testExpected("video.canPlayType('video/webm; codecs=\"vp8, vorbis\"', 'com.example.invalid')", "");35 consoleWrite("<br>WebM video container with two valid codecs result in \"probably\" regardless of the order.");36 testExpected("video.canPlayType('video/webm; codecs=\"vorbis, vp8\"')", "probably");37 testExpected("video.canPlayType('video/webm; codecs=\"vorbis, vp8\"', '')", "probably");38 testExpected("video.canPlayType('video/webm; codecs=\"vorbis, vp8\"', null)", "probably");39 testExpected("video.canPlayType('video/webm; codecs=\"vorbis, vp8\"', undefined)", "probably");40 testExpected("video.canPlayType('video/webm; codecs=\"vorbis, vp8\"', 'webkit-org.w3.clearkey')", "probably");41 testExpected("video.canPlayType('video/webm; codecs=\"vorbis, vp8\"', 'WeBkIt-OrG.W3.ClEaRkEy')", "probably");42 testExpected("video.canPlayType('video/webm; codecs=\"vorbis, vp8\"', 'com.example.invalid')", "");43 consoleWrite("<br>WebM video container with an invalid codec results in \"\".");44 testExpected("video.canPlayType('video/webm; codecs=\"1\"')", "");45 testExpected("video.canPlayType('video/webm; codecs=\"1\"', '')", "");46 testExpected("video.canPlayType('video/webm; codecs=\"1\"', null)", "");47 testExpected("video.canPlayType('video/webm; codecs=\"1\"', undefined)", "");48 testExpected("video.canPlayType('video/webm; codecs=\"1\"', 'webkit-org.w3.clearkey')", "");49 testExpected("video.canPlayType('video/webm; codecs=\"1\"', 'WeBkIt-OrG.W3.ClEaRkEy')", "");50 testExpected("video.canPlayType('video/webm; codecs=\"1\"', 'com.example.invalid')", "");51 consoleWrite("<br>WebM video container with any invalid codec results in \"\".");52 testExpected("video.canPlayType('video/webm; codecs=\"vp8, 1\"')", "");53 testExpected("video.canPlayType('video/webm; codecs=\"vp8, 1\"', '')", "");54 testExpected("video.canPlayType('video/webm; codecs=\"vp8, 1\"', null)", "");55 testExpected("video.canPlayType('video/webm; codecs=\"vp8, 1\"', undefined)", "");56 testExpected("video.canPlayType('video/webm; codecs=\"vp8, 1\"', 'webkit-org.w3.clearkey')", "");57 testExpected("video.canPlayType('video/webm; codecs=\"vp8, 1\"', 'WeBkIt-OrG.W3.ClEaRkEy')", "");58 testExpected("video.canPlayType('video/webm; codecs=\"vp8, 1\"', 'com.example.invalid')", "");59 consoleWrite("<br>WebM video container with any invalid codec results in \"\" regardless of the order.");60 testExpected("video.canPlayType('video/webm; codecs=\"1, vp8\"')", "");61 testExpected("video.canPlayType('video/webm; codecs=\"1, vp8\"', '')", "");62 testExpected("video.canPlayType('video/webm; codecs=\"1, vp8\"', null)", "");63 testExpected("video.canPlayType('video/webm; codecs=\"1, vp8\"', undefined)", "");64 testExpected("video.canPlayType('video/webm; codecs=\"1, vp8\"', 'webkit-org.w3.clearkey')", "");65 testExpected("video.canPlayType('video/webm; codecs=\"1, vp8\"', 'WeBkIt-OrG.W3.ClEaRkEy')", "");66 testExpected("video.canPlayType('video/webm; codecs=\"1, vp8\"', 'com.example.invalid')", "");67 consoleWrite("<br>WebM audio container without a codec results in \"maybe\".");68 testExpected("video.canPlayType('audio/webm')", "maybe");69 testExpected("video.canPlayType('audio/webm', '')", "maybe");70 testExpected("video.canPlayType('audio/webm', null)", "maybe");71 testExpected("video.canPlayType('audio/webm', undefined)", "maybe");72 testExpected("video.canPlayType('audio/webm', 'webkit-org.w3.clearkey')", "maybe");73 testExpected("video.canPlayType('audio/webm', 'WeBkIt-OrG.W3.ClEaRkEy')", "maybe");74 testExpected("video.canPlayType('audio/webm', 'com.example.invalid')", "");75 consoleWrite("<br>WebM audio container with a valid codec results in \"probably\".");76 testExpected("video.canPlayType('audio/webm; codecs=\"vorbis\"')", "probably");77 testExpected("video.canPlayType('audio/webm; codecs=\"vorbis\"', '')", "probably");78 testExpected("video.canPlayType('audio/webm; codecs=\"vorbis\"', null)", "probably");79 testExpected("video.canPlayType('audio/webm; codecs=\"vorbis\"', undefined)", "probably");80 testExpected("video.canPlayType('audio/webm; codecs=\"vorbis\"', 'webkit-org.w3.clearkey')", "probably");81 testExpected("video.canPlayType('audio/webm; codecs=\"vorbis\"', 'WeBkIt-OrG.W3.ClEaRkEy')", "probably");82 testExpected("video.canPlayType('audio/webm; codecs=\"vorbis\"', 'com.example.invalid')", "");83 consoleWrite("<br>WebM video container with a video codec results in \"\".");84 testExpected("video.canPlayType('audio/webm; codecs=\"vp8\"')", "");85 testExpected("video.canPlayType('audio/webm; codecs=\"vp8\"', '')", "");86 testExpected("video.canPlayType('audio/webm; codecs=\"vp8\"', null)", "");87 testExpected("video.canPlayType('audio/webm; codecs=\"vp8\"', undefined)", "");88 testExpected("video.canPlayType('audio/webm; codecs=\"vp8\"', 'webkit-org.w3.clearkey')", "");89 testExpected("video.canPlayType('audio/webm; codecs=\"vp8\"', 'WeBkIt-OrG.W3.ClEaRkEy')", "");90 testExpected("video.canPlayType('audio/webm; codecs=\"vp8\"', 'com.example.invalid')", "");91 consoleWrite("<br>Case does not matter (except for the codecs string).");92 testExpected("video.canPlayType('ViDeO/WeBm; CoDeCs=\"vp8, vorbis\"')", "probably");93 testExpected("video.canPlayType('ViDeO/WeBm; CoDeCs=\"vp8, vorbis\"', '')", "probably");94 testExpected("video.canPlayType('ViDeO/WeBm; CoDeCs=\"vp8, vorbis\"', null)", "probably");95 testExpected("video.canPlayType('ViDeO/WeBm; CoDeCs=\"vp8, vorbis\"', undefined)", "probably");96 testExpected("video.canPlayType('ViDeO/WeBm; CoDeCs=\"vp8, vorbis\"', 'webkit-org.w3.clearkey')", "probably");97 testExpected("video.canPlayType('ViDeO/WeBm; CoDeCs=\"vp8, vorbis\"', 'WeBkIt-OrG.W3.ClEaRkEy')", "probably");98 testExpected("video.canPlayType('ViDeO/WeBm; CoDeCs=\"vp8, vorbis\"', 'com.example.invalid')", "");99 consoleWrite("<br>The codecs string is case sensitive, so non-lower-case codecs result in \"\".");100 testExpected("video.canPlayType('ViDeO/WeBm; CoDeCs=\"Vp8, VoRbIs\"')", "");101 testExpected("video.canPlayType('ViDeO/WeBm; CoDeCs=\"Vp8, VoRbIs\"', '')", "");102 testExpected("video.canPlayType('ViDeO/WeBm; CoDeCs=\"Vp8, VoRbIs\"', null)", "");103 testExpected("video.canPlayType('ViDeO/WeBm; CoDeCs=\"Vp8, VoRbIs\"', undefined)", "");104 testExpected("video.canPlayType('ViDeO/WeBm; CoDeCs=\"Vp8, VoRbIs\"', 'webkit-org.w3.clearkey')", "");...
index.html
Source:index.html
...10 </style>11</head>12<body>13 <video id="video" width="400" autoplay loop muted>14 <source src="video.webm" type="video/webm">15 </video>16 <video id="video" width="400" autoplay loop muted>17 <source src="video.webm" type="video/webm">18 </video> <video id="video" width="400" autoplay loop muted>19 <source src="video.webm" type="video/webm">20 </video> <video id="video" width="400" autoplay loop muted>21 <source src="video.webm" type="video/webm">22 </video> <video id="video" width="400" autoplay loop muted>23 <source src="video.webm" type="video/webm">24 </video> <video id="video" width="400" autoplay loop muted>25 <source src="video.webm" type="video/webm">26 </video> <video id="video" width="400" autoplay loop muted>27 <source src="video.webm" type="video/webm">28 </video> <video id="video" width="400" autoplay loop muted>29 <source src="video.webm" type="video/webm">30 </video> <video id="video" width="400" autoplay loop muted>31 <source src="video.webm" type="video/webm">32 </video> <video id="video" width="400" autoplay loop muted>33 <source src="video.webm" type="video/webm">34 </video> <video id="video" width="400" autoplay loop muted>35 <source src="video.webm" type="video/webm">36 </video> <video id="video" width="400" autoplay loop muted>37 <source src="video.webm" type="video/webm">38 </video> <video id="video" width="400" autoplay loop muted>39 <source src="video.webm" type="video/webm">40 </video> <video id="video" width="400" autoplay loop muted>41 <source src="video.webm" type="video/webm">42 </video> <video id="video" width="400" autoplay loop muted>43 <source src="video.webm" type="video/webm">44 </video>45</body>...
Browser Support For Safari on iOS Versions
Browser Support For Android Browser Versions
Browser Support For Chrome for Android Versions
Browser Support For Firefox for Android Versions
Browser Support For Samsung Internet Versions
Debug webpages on the go with LT Debug Chrome extension.
Add to ChromeTest your website on 3000+ real browsers and operating systems for mobile and desktop with the LambdaTest cloud. Perform browser compatibility test for WebM video format and many more web technologies that are a part of your website or web-application.
Last Modified date
2023-03-20
Data sourced from
Debug webpages on the go with LT Debug Chrome extension.
Add to ChromeHarness the power of Chromium-based engine to deliver responsive websites and web apps.
Try for freeGet 100 minutes of automation test minutes FREE!!