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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 function onTimeUpdate(event) | 63 function onTimeUpdate(event) |
64 { | 64 { |
65 if (event.target.currentTime < 0.2 || !isUpdatePromiseResolv ed) | 65 if (event.target.currentTime < 0.2 || !isUpdatePromiseResolv ed) |
66 return; | 66 return; |
67 | 67 |
68 test.done(); | 68 test.done(); |
69 } | 69 } |
70 | 70 |
71 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { | 71 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { |
72 | 72 |
73 waitForEventAndRunStep('needkey', video, onNeedKey, test); | 73 waitForEventAndRunStep('needkey', video, onNeedKey, test); |
ddorwin
2014/08/08 02:50:50
Why were these moved out in the previous files but
jrummell
2014/08/08 23:15:11
Probably while testing I tried different things, a
| |
74 waitForEventAndRunStep('playing', video, onPlaying, test); | 74 waitForEventAndRunStep('playing', video, onPlaying, test); |
75 | 75 |
76 video.src = '../content/test-encrypted.webm'; | 76 video.src = '../content/test-encrypted.webm'; |
77 video.setMediaKeys(mediaKeys); | 77 return video.setMediaKeys(mediaKeys); |
78 }).then(function(result) { | |
78 video.play(); | 79 video.play(); |
79 }).catch(function(error) { | 80 }).catch(function(error) { |
80 forceTestFailureFromPromise(test, error); | 81 forceTestFailureFromPromise(test, error); |
81 }); | 82 }); |
82 }, 'Playback using Clear Key key system, calling setMediaKeys() afte r setting src attribute.'); | 83 }, 'Playback using Clear Key key system, calling setMediaKeys() afte r setting src attribute.'); |
83 </script> | 84 </script> |
84 </body> | 85 </body> |
85 </html> | 86 </html> |
OLD | NEW |