| OLD | NEW |
| 1 var consoleDiv = null; | 1 var consoleDiv = null; |
| 2 | 2 |
| 3 function consoleWrite(text) | 3 function consoleWrite(text) |
| 4 { | 4 { |
| 5 if (!consoleDiv && document.body) { | 5 if (!consoleDiv && document.body) { |
| 6 consoleDiv = document.createElement('div'); | 6 consoleDiv = document.createElement('div'); |
| 7 document.body.appendChild(consoleDiv); | 7 document.body.appendChild(consoleDiv); |
| 8 } | 8 } |
| 9 var span = document.createElement('span'); | 9 var span = document.createElement('span'); |
| 10 span.appendChild(document.createTextNode(text)); | 10 span.appendChild(document.createTextNode(text)); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 { | 25 { |
| 26 if (initDataType == 'webm') { | 26 if (initDataType == 'webm') { |
| 27 return new Uint8Array([ | 27 return new Uint8Array([ |
| 28 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, | 28 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, |
| 29 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F | 29 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F |
| 30 ]); | 30 ]); |
| 31 } | 31 } |
| 32 | 32 |
| 33 if (initDataType == 'cenc') { | 33 if (initDataType == 'cenc') { |
| 34 return new Uint8Array([ | 34 return new Uint8Array([ |
| 35 0x00, 0x00, 0x00, 0x00, // size = 0 | 35 0x00, 0x00, 0x00, 0x34, // size = 52 |
| 36 0x70, 0x73, 0x73, 0x68, // 'pssh' | 36 0x70, 0x73, 0x73, 0x68, // 'pssh' |
| 37 0x01, // version = 1 | 37 0x01, // version = 1 |
| 38 0x00, 0x00, 0x00, // flags | 38 0x00, 0x00, 0x00, // flags |
| 39 0x10, 0x77, 0xEF, 0xEC, 0xC0, 0xB2, 0x4D, 0x02, // Common SystemID | 39 0x10, 0x77, 0xEF, 0xEC, 0xC0, 0xB2, 0x4D, 0x02, // Common SystemID |
| 40 0xAC, 0xE3, 0x3C, 0x1E, 0x52, 0xE2, 0xFB, 0x4B, | 40 0xAC, 0xE3, 0x3C, 0x1E, 0x52, 0xE2, 0xFB, 0x4B, |
| 41 0x00, 0x00, 0x00, 0x01, // key count | 41 0x00, 0x00, 0x00, 0x01, // key count |
| 42 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // key | 42 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, // key |
| 43 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, | 43 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, |
| 44 0x00, 0x00, 0x00, 0x00 // datasize | 44 0x00, 0x00, 0x00, 0x00 // datasize |
| 45 ]); | 45 ]); |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 video.play(); | 322 video.play(); |
| 323 return new Promise(function(resolve) { | 323 return new Promise(function(resolve) { |
| 324 video.addEventListener('timeupdate', function listener(event) { | 324 video.addEventListener('timeupdate', function listener(event) { |
| 325 if (event.target.currentTime < duration) | 325 if (event.target.currentTime < duration) |
| 326 return; | 326 return; |
| 327 video.removeEventListener('timeupdate', listener); | 327 video.removeEventListener('timeupdate', listener); |
| 328 resolve('success'); | 328 resolve('success'); |
| 329 }); | 329 }); |
| 330 }); | 330 }); |
| 331 } | 331 } |
| OLD | NEW |