openvv
openvv copied to clipboard
Invalid result of viewability
I have inserted swf-player on the page as <OBJECT data="..."><EMBED src="..." /></OBJECT>
and in some browsers(Opera, Safari, Chrome) I get invalid result of viewability, because some browsers ignoring tag <EMBED>
and it has not size value. Your JS script uses <EMBED>
as default if it exists.
I found a temporary workaround. In function "findPlayer" check for "clientWidth" and if it doesn't exists then return "embeds[i].parentNode". But I do not think that it is the perfect solution.
Please fix it, if it possible.
P.S. sample of my changes
for (var i = 0; i < embeds.length; i++) {
if (embeds[i][id] || embeds[i]['onJsReady' + id]) {
if (embeds[i].clientWidth) {
return embeds[i];
}
else if(embeds[i].parentNode.nodeName.toUpperCase() === "OBJECT") {
return embeds[i].parentNode;
}
else {
// I have't any ideas
}
}
}