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

Function getPlayer

flash/camera/html-template/history/history.js:116–154  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

114 // Get the Flash player object for performing ExternalInterface callbacks.
115 // Updated for changes to SWFObject2.
116 function getPlayer(id) {
117 var i;
118
119 if (id && document.getElementById(id)) {
120 var r = document.getElementById(id);
121 if (typeof r.SetVariable != "undefined") {
122 return r;
123 }
124 else {
125 var o = r.getElementsByTagName("object");
126 var e = r.getElementsByTagName("embed");
127 for (i = 0; i < o.length; i++) {
128 if (typeof o[i].browserURLChange != "undefined")
129 return o[i];
130 }
131 for (i = 0; i < e.length; i++) {
132 if (typeof e[i].browserURLChange != "undefined")
133 return e[i];
134 }
135 }
136 }
137 else {
138 var o = document.getElementsByTagName("object");
139 var e = document.getElementsByTagName("embed");
140 for (i = 0; i < e.length; i++) {
141 if (typeof e[i].browserURLChange != "undefined")
142 {
143 return e[i];
144 }
145 }
146 for (i = 0; i < o.length; i++) {
147 if (typeof o[i].browserURLChange != "undefined")
148 {
149 return o[i];
150 }
151 }
152 }
153 return undefined;
154 }
155
156 function getPlayers() {
157 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…