MCPcopy Create free account
hub / github.com/mailru/FileAPI / getPlayer

Function getPlayer

flash/image/html-template/history/history.js:125–163  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

123 // Get the Flash player object for performing ExternalInterface callbacks.
124 // Updated for changes to SWFObject2.
125 function getPlayer(id) {
126 var i;
127
128 if (id && document.getElementById(id)) {
129 var r = document.getElementById(id);
130 if (typeof r.SetVariable != "undefined") {
131 return r;
132 }
133 else {
134 var o = r.getElementsByTagName("object");
135 var e = r.getElementsByTagName("embed");
136 for (i = 0; i < o.length; i++) {
137 if (typeof o[i].browserURLChange != "undefined")
138 return o[i];
139 }
140 for (i = 0; i < e.length; i++) {
141 if (typeof e[i].browserURLChange != "undefined")
142 return e[i];
143 }
144 }
145 }
146 else {
147 var o = document.getElementsByTagName("object");
148 var e = document.getElementsByTagName("embed");
149 for (i = 0; i < e.length; i++) {
150 if (typeof e[i].browserURLChange != "undefined")
151 {
152 return e[i];
153 }
154 }
155 for (i = 0; i < o.length; i++) {
156 if (typeof o[i].browserURLChange != "undefined")
157 {
158 return o[i];
159 }
160 }
161 }
162 return undefined;
163 }
164
165 function getPlayers() {
166 var i;

Callers 3

hashChangeHandlerFunction · 0.70
checkForUrlChangeFunction · 0.70
history.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…