| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Clear Key Playback with Multiple Sessions</title> | 4 <title>Clear Key Playback with Multiple Sessions</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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 function onTimeUpdate(event) | 83 function onTimeUpdate(event) |
| 84 { | 84 { |
| 85 if (event.target.currentTime < 0.2) | 85 if (event.target.currentTime < 0.2) |
| 86 return; | 86 return; |
| 87 | 87 |
| 88 test.done(); | 88 test.done(); |
| 89 } | 89 } |
| 90 | 90 |
| 91 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { | 91 MediaKeys.create('org.w3.clearkey').then(function(mediaKeys) { |
| 92 | |
| 93 waitForEventAndRunStep('needkey', video, onNeedKey, test); | 92 waitForEventAndRunStep('needkey', video, onNeedKey, test); |
| 94 waitForEventAndRunStep('playing', video, onPlaying, test); | 93 waitForEventAndRunStep('playing', video, onPlaying, test); |
| 95 | |
| 96 video.setMediaKeys(mediaKeys); | |
| 97 video.src = '../content/test-encrypted-different-av-keys.web
m'; | 94 video.src = '../content/test-encrypted-different-av-keys.web
m'; |
| 95 return video.setMediaKeys(mediaKeys); |
| 96 }).then(function(result) { |
| 98 video.play(); | 97 video.play(); |
| 99 }).catch(function(error) { | 98 }).catch(function(error) { |
| 100 forceTestFailureFromPromise(test, error); | 99 forceTestFailureFromPromise(test, error); |
| 101 }); | 100 }); |
| 102 }, 'Playback using Clear Key key system with multiple sessions.'); | 101 }, 'Playback using Clear Key key system with multiple sessions.'); |
| 103 </script> | 102 </script> |
| 104 </body> | 103 </body> |
| 105 </html> | 104 </html> |
| OLD | NEW |