OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html lang='en-US'> | 2 <html lang='en-US'> |
3 <head> | 3 <head> |
4 <title>EME playback test application</title> | 4 <title>EME playback test application</title> |
5 </head> | 5 </head> |
6 <body style='font-family:"Lucida Console", Monaco, monospace; font-size:14px'> | 6 <body style='font-family:"Lucida Console", Monaco, monospace; font-size:14px'> |
7 <i>Clearkey works only with content encrypted using bear key.</i><br><br> | 7 <i>Clearkey works only with content encrypted using bear key.</i><br><br> |
8 <table> | 8 <table> |
9 <tr title='URL param mediaFile=...'> | 9 <tr title='URL param mediaFile=...'> |
10 <td><label for='mediaFile'>Encrypted video URL:</label></td> | 10 <td><label for='mediaFile'>Encrypted video URL:</label></td> |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 return; | 69 return; |
70 // For loadSession() tests, addKey() will not be called after | 70 // For loadSession() tests, addKey() will not be called after |
71 // loadSession() (the key is loaded internally). Do not check keyadded | 71 // loadSession() (the key is loaded internally). Do not check keyadded |
72 // and heartbeat for these tests. | 72 // and heartbeat for these tests. |
73 if (!testConfig.sessionToLoad) { | 73 if (!testConfig.sessionToLoad) { |
74 // keyadded may be fired around the start of playback; check for it | 74 // keyadded may be fired around the start of playback; check for it |
75 // after a delay to avoid timing issues. | 75 // after a delay to avoid timing issues. |
76 if (testConfig.usePrefixedEME && !video.receivedKeyAdded) | 76 if (testConfig.usePrefixedEME && !video.receivedKeyAdded) |
77 Utils.failTest('Key added event not received.'); | 77 Utils.failTest('Key added event not received.'); |
78 if (testConfig.keySystem == EXTERNAL_CLEARKEY && | 78 if (testConfig.keySystem == EXTERNAL_CLEARKEY && |
| 79 !testConfig.usePrefixedEME && |
| 80 !video.receivedRenewalMessage) |
| 81 Utils.failTest('license-renewal message not received.'); |
| 82 if (testConfig.keySystem == EXTERNAL_CLEARKEY && |
| 83 testConfig.usePrefixedEME && |
79 !video.receivedHeartbeat) | 84 !video.receivedHeartbeat) |
80 Utils.failTest('Heartbeat keymessage event not received.'); | 85 Utils.failTest('Heartbeat keymessage event not received.'); |
81 } | 86 } |
82 video.removeEventListener('ended', Utils.failTest); | 87 video.removeEventListener('ended', Utils.failTest); |
83 Utils.installTitleEventHandler(video, 'ended'); | 88 Utils.installTitleEventHandler(video, 'ended'); |
84 video.removeEventListener('timeupdate', onTimeUpdate); | 89 video.removeEventListener('timeupdate', onTimeUpdate); |
85 } | 90 } |
86 | 91 |
87 function Play(video) { | 92 function Play(video) { |
88 Utils.resetTitleChange(); | 93 Utils.resetTitleChange(); |
(...skipping 11 matching lines...) Expand all Loading... |
100 element.style['display'] = 'none'; | 105 element.style['display'] = 'none'; |
101 else | 106 else |
102 element.style['display'] = ''; | 107 element.style['display'] = ''; |
103 } | 108 } |
104 | 109 |
105 emeApp.createPlayer() | 110 emeApp.createPlayer() |
106 .then(function(player) { Play(player.video); }) | 111 .then(function(player) { Play(player.video); }) |
107 .catch(function(error) { Utils.failTest('Unable to play video.'); }); | 112 .catch(function(error) { Utils.failTest('Unable to play video.'); }); |
108 </script> | 113 </script> |
109 </html> | 114 </html> |
OLD | NEW |