decodingInfoEncryptedMedia.http.html (1003B)
1 <!DOCTYPE html> 2 <title>MediaCapabilities.decodingInfo for encrypted media (non-secure context)</title> 3 <script src=/resources/testharness.js></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script> 6 7 // Minimal VideoConfiguration that will be allowed per spec. All optional 8 // properties are missing. 9 var minimalVideoConfiguration = { 10 contentType: 'video/webm; codecs="vp09.00.10.08"', 11 width: 800, 12 height: 600, 13 bitrate: 3000, 14 framerate: 24, 15 }; 16 17 // Minimal MediaCapabilitiesKeySystemConfiguration that will be allowed per 18 // spec. All optional properties are missing. 19 var minimalKeySystemConfiguration = { 20 keySystem: 'org.w3.clearkey' 21 }; 22 23 promise_test(t => { 24 return promise_rejects_dom(t, 'SecurityError', navigator.mediaCapabilities.decodingInfo({ 25 type: 'file', 26 video: minimalVideoConfiguration, 27 keySystemConfiguration: minimalKeySystemConfiguration, 28 })); 29 }, "Test that decodingInfo with a keySystemConfiguration fails on a non-secure context."); 30 31 </script>