OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Clear Key Playback</title> | 4 <title>Clear Key Playback</title> |
5 <script src="encrypted-media-utils.js"></script> | 5 <script src="encrypted-media-utils.js"></script> |
6 <script src="../../resources/testharness.js"></script> | 6 <script src="../../resources/testharness.js"></script> |
7 <script src="../../resources/testharnessreport.js"></script> | 7 <script src="../../resources/testharnessreport.js"></script> |
8 </head> | 8 </head> |
9 <body> | 9 <body> |
10 <video id="testVideo"></video> | 10 <video id="testVideo"></video> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 return; | 65 return; |
66 | 66 |
67 test.done(); | 67 test.done(); |
68 } | 68 } |
69 | 69 |
70 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { | 70 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { |
71 | 71 |
72 waitForEventAndRunStep('needkey', video, onNeedKey, test); | 72 waitForEventAndRunStep('needkey', video, onNeedKey, test); |
73 waitForEventAndRunStep('playing', video, onPlaying, test); | 73 waitForEventAndRunStep('playing', video, onPlaying, test); |
74 | 74 |
75 video.setMediaKeys(mediaKeys); | 75 return video.setMediaKeys(mediaKeys); |
| 76 }).then(function(result) { |
76 video.src = '../content/test-encrypted.webm'; | 77 video.src = '../content/test-encrypted.webm'; |
77 video.play(); | 78 video.play(); |
78 }).catch(function(error) { | 79 }).catch(function(error) { |
79 forceTestFailureFromPromise(test, error); | 80 forceTestFailureFromPromise(test, error); |
80 }); | 81 }); |
81 }, 'Playback using Clear Key key system, calling setMediaKeys() befo
re setting src attribute.'); | 82 }, 'Playback using Clear Key key system, calling setMediaKeys() befo
re setting src attribute.'); |
82 </script> | 83 </script> |
83 </body> | 84 </body> |
84 </html> | 85 </html> |
OLD | NEW |