| OLD | NEW |
| 1 var audioCodecs = [ | 1 var audioCodecs = [ |
| 2 ["audio/wav", "wav"], | 2 ["audio/wav", "wav"], |
| 3 ["audio/aac", "m4a"], | 3 ["audio/aac", "m4a"], |
| 4 ["audio/mpeg", "mp3"], | |
| 5 ["audio/ogg", "oga"] | 4 ["audio/ogg", "oga"] |
| 6 ]; | 5 ]; |
| 7 | 6 |
| 8 var videoCodecs = [ | 7 var videoCodecs = [ |
| 9 ["video/mp4", "mp4"], | 8 ["video/mp4", "mp4"], |
| 10 ["video/mpeg", "mpg"], | |
| 11 ["video/quicktime", "mov"], | |
| 12 ["video/ogg", "ogv"] | 9 ["video/ogg", "ogv"] |
| 13 ]; | 10 ]; |
| 14 | 11 |
| 15 function findMediaFile(tagName, name) { | 12 function findMediaFile(tagName, name) { |
| 16 var codecs; | 13 var codecs; |
| 17 if (tagName == "audio") | 14 if (tagName == "audio") |
| 18 codecs = audioCodecs; | 15 codecs = audioCodecs; |
| 19 else | 16 else |
| 20 codecs = videoCodecs; | 17 codecs = videoCodecs; |
| 21 | 18 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 if (element) | 62 if (element) |
| 66 element.src = src; | 63 element.src = src; |
| 67 } | 64 } |
| 68 | 65 |
| 69 function stripExtension(filename) { | 66 function stripExtension(filename) { |
| 70 var lastPeriodIndex = filename.lastIndexOf("."); | 67 var lastPeriodIndex = filename.lastIndexOf("."); |
| 71 if (lastPeriodIndex > 0) | 68 if (lastPeriodIndex > 0) |
| 72 return filename.substring(0, lastPeriodIndex); | 69 return filename.substring(0, lastPeriodIndex); |
| 73 return filename; | 70 return filename; |
| 74 } | 71 } |
| OLD | NEW |