()
| 191 | - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available |
| 192 | */ |
| 193 | function testPlayerVersion() { |
| 194 | var b = doc.getElementsByTagName("body")[0]; |
| 195 | var o = createElement(OBJECT); |
| 196 | o.setAttribute("type", FLASH_MIME_TYPE); |
| 197 | var t = b.appendChild(o); |
| 198 | if (t) { |
| 199 | var counter = 0; |
| 200 | (function(){ |
| 201 | if (typeof t.GetVariable != UNDEF) { |
| 202 | var d = t.GetVariable("$version"); |
| 203 | if (d) { |
| 204 | d = d.split(" ")[1].split(","); |
| 205 | ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)]; |
| 206 | } |
| 207 | } |
| 208 | else if (counter < 10) { |
| 209 | counter++; |
| 210 | setTimeout(arguments.callee, 10); |
| 211 | return; |
| 212 | } |
| 213 | b.removeChild(o); |
| 214 | t = null; |
| 215 | matchVersions(); |
| 216 | })(); |
| 217 | } |
| 218 | else { |
| 219 | matchVersions(); |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | /* Perform Flash Player and SWF version matching; static publishing only |
| 224 | */ |
no test coverage detected
searching dependent graphs…