OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <script src="../../resources/js-test.js"></script> |
| 4 <body> |
| 5 <script type="text/javascript"> |
| 6 description("Test EME callbacks in WebView"); |
| 7 window.jsTestIsAsync = true; |
| 8 |
| 9 // TODO(yolandyan) Look into whether more key system need to be added |
| 10 var chromeKeySystem = "com.widevine.alpha" |
| 11 |
| 12 var tryKeySystem = function(keySystem) { |
| 13 debug("keySystem is " + keySystem); |
| 14 navigator.requestMediaKeySystemAccess( |
| 15 keySystem, |
| 16 [ |
| 17 { distinctiveIdentifier: "required", |
| 18 persistentState: "required", |
| 19 label: "'distinctiveIdentifier' and 'persistentState' required" |
| 20 }, |
| 21 { distinctiveIdentifier: "required", |
| 22 label: "'distinctiveIdentifier' required" |
| 23 }, |
| 24 { persistentState: "required", |
| 25 label: "'persistentState' required" |
| 26 }, |
| 27 { label: "empty" } |
| 28 ] |
| 29 ).then( |
| 30 function (mediaKeySystemAccess) { |
| 31 debug("EME success"); |
| 32 finishJSTest(); |
| 33 }, |
| 34 function (error) { |
| 35 debug("onError: code" + error.code + ", message=" + error.message); |
| 36 finishJSTest(); |
| 37 } |
| 38 ); |
| 39 }; |
| 40 |
| 41 tryKeySystem(chromeKeySystem); |
| 42 </script> |
| 43 </body> |
| 44 </html> |
OLD | NEW |