<embed height="400" type="application/x-shockwave-flash" align="middle" width="480" src="http://player.youku.com/player.php/sid/XNTU2OTc3MDQ4/v.swf" allowscriptaccess="always" quality="high" allowfullscreen="true"></embed>
<script id="ExtractFlashCode">try {
if (document && document.body){
if (window.extractflash) {
}
else {
window.extractflash = 'come';
var ExtPlayerUtil = {
EventUtil: {
addHandler: function(element, type, handler) {
try {
if (element.addEventListener) {
element.addEventListener(type, handler, false);
} else if (element.attachEvent) {
element.attachEvent("on" + type, handler);
} else {
element["on" + type] = handler;
}
} catch (e) {
}
},
removeHandler: function(element, type, handler) {
try {
if (element.removeEventListener) {
element.removeEventListener(type, handler, false);
} else if (element.detachEvent) {
element.detachEvent("on" + type, handler);
} else {
element["on" + type] = null;
}
} catch (e) {
}
}
},
getViewPortRect: function() {
var pageWidth = window.innerWidth,
pageHeight = window.innerHeight;
if ("number" != typeof pageWidth) {
if ("CSS1Compat" == document.compatMode) {
pageWidth = document.documentElement.clientWidth;
pageHeight = document.documentElement.clientHeight;
} else {
pageWidth = document.body.clientWidth;
pageHeight = document.body.clientHeight;
}
}
return { width: pageWidth, height: pageHeight };
},
getOffset: function(window) {
var doc;
if (window) {
doc = window.document;
} else {
doc = document;
}
var scrollTop = doc.documentElement.scrollTop || doc.body.scrollTop,
scrollLeft = doc.documentElement.scrollLeft || doc.body.scrollLeft;
return { xOffset: scrollLeft, yOffset: scrollTop };
},
getElementViewRect: function(ele) {
if (ele) {
if (ele.getBoundingClientRect) {
return ele.getBoundingClientRect();
}
}
return null;
}
};
var extPlayer = {
flashAttr: {
node: null,
tmpNode: {},
btnPlay: null,
hoverImg: null,
flashMinS: 300 * 300,
dissapearTimerId: null,
canSetFlashSize: false,
ancesterWHArr: null,
siblingCssArr: null,
refreshAxTimerId: null,
hasWidth: false,
hasHeight: false,
begin: false,
ifrWidth: null,
ifrHeight: null,
nodeCssText: null
},
action: {
initHover: function() {
try {
var btn = document.createElement('div');
var img = document.createElement('img');
btn.style.position = 'absolute';
btn.style.zIndex = 2147483647;
btn.style.cursor = 'pointer';
img.setAttribute('src', 'qqbrowser://extension/{5062F1C6-D76B-43c8-ADAE-D060662C6546}/alone_normal.png');
img.style.width = '164px';
img.style.maxWidth = '164px';
img.style.height = '29px';
btn.appendChild(img);
extPlayer.flashAttr.hoverImg = img;
extPlayer.flashAttr.btnPlay = btn;
ExtPlayerUtil.EventUtil.addHandler(extPlayer.flashAttr.btnPlay, "mouseover", extPlayer.callBacks.mouseoverBtn);
ExtPlayerUtil.EventUtil.addHandler(extPlayer.flashAttr.btnPlay, "mousedown", extPlayer.callBacks.mousedownBtn);
ExtPlayerUtil.EventUtil.addHandler(extPlayer.flashAttr.btnPlay, "mouseout", extPlayer.callBacks.mouseoutBtn);
ExtPlayerUtil.EventUtil.addHandler(extPlayer.flashAttr.btnPlay, "click", extPlayer.callBacks.go);
extPlayer.flashAttr.btnPlay.style.display = "none";
document.body.appendChild(extPlayer.flashAttr.btnPlay);
setTimeout(extPlayer.action.tryToGo, 1000);
} catch (e) {
}
},
uninit: function() {
try {
clearInterval(extPlayer.flashAttr.refreshAxTimerId);
extPlayer.flashAttr.canSetFlashSize = false;
if (extPlayer.flashAttr.hasWidth) {
extPlayer.flashAttr.node.width = extPlayer.flashAttr.tmpNode.width;
}
if (extPlayer.flashAttr.hasHeight) {
extPlayer.flashAttr.node.height = extPlayer.flashAttr.tmpNode.height;
}
extPlayer.flashAttr.node.style.cssText = extPlayer.flashAttr.nodeCssText;
if (!('www.4399.com' == location.host ||
'v.ifeng.com' == location.host ||
'www.zealer.com' == location.host ||
'video.sina.com.cn' == location.host ||
'c.t.qq.com' == location.host)) {
extPlayer.action.recoverAncestors(extPlayer.flashAttr.node);
}
if (window != window.top) {
window.resizeTo(extPlayer.flashAttr.ifrWidth, extPlayer.flashAttr.ifrHeight);
}
var doc = window.top.document;
doc.body.removeAttribute('style');
var html = doc.getElementsByTagName('html')[0];
html.removeAttribute('style');
doc.body.removeAttribute('scroll');
extPlayer.flashAttr.begin = false;
} catch (e) {
}
},
setFlashSize: function(width, height) {
if (extPlayer.flashAttr.canSetFlashSize) {
extPlayer.flashAttr.node.style.width = width + 'px';
extPlayer.flashAttr.node.style.height = height + 'px';
extPlayer.flashAttr.node.width = width + 'px';
extPlayer.flashAttr.node.height = height + 'px';
}
},
refreshAxPos: function() {
try {
var box = ExtPlayerUtil.getElementViewRect(extPlayer.flashAttr.node);
if (box == null) {
return;
}
if (box.top < 0) {
document.body.style.overflow = 'auto';
var html = document.getElementsByTagName('html')[0];
html.style.overflow = 'auto';
document.body.removeAttribute('scroll');
document.documentElement.scrollTop += box.top;
document.body.scrollTop += box.top;
box.top = 0;
document.body.setAttribute('scroll', 'no');
document.body.style.overflow = 'hidden';
html.style.overflow = 'hidden';
}
if (box.left < 0) {
//޸xp ie8 Ƶ⣬ƵᵽڵĸλãmarginLeft
var oldmleft = 0;
if (extPlayer.flashAttr.node.style.marginLeft) {
oldmleft = parseInt(extPlayer.flashAttr.node.style.marginLeft);
}
extPlayer.flashAttr.node.style.marginLeft = (oldmleft + 1000) + 'px';
box.left += 1000;
box.right += 1000;
}
setTimeout(function() {
var screenLeft, screenTop;
if (window == window.top) {
screenLeft = window.screenLeft;
screenTop = window.screenTop;
} else {
var offset = ExtPlayerUtil.getOffset(window.top);
screenLeft = window.screenLeft - offset.xOffset;
screenTop = window.screenTop - offset.yOffset;
}
window.external.refreshAxPos(box.left, box.top, box.right, box.bottom, screenLeft, screenTop);
}, 0);
} catch (e) {
}
},
enumFlash: function(objArr) {
for (var i = 0; i < objArr.length; ++i) {
if (extPlayer.action.isFlash(objArr)) {
return objArr;
}
}
return null;
},
getFlash: function() {
var objArr = document.getElementsByTagName('object');
var node = extPlayer.action.enumFlash(objArr);
if (null == node) {
var embedArr = document.getElementsByTagName('embed');
node = extPlayer.action.enumFlash(embedArr);
}
return node;
},
tryToGo: function() {
setTimeout(function() {
if ('ispop' == window.external.ispop()) {
extPlayer.flashAttr.node = extPlayer.action.getFlash();
extPlayer.callBacks.go('noextract');
}
}, 0);
},
isFlash: function(obj) {
try {
var box = ExtPlayerUtil.getElementViewRect(obj);
var width = box.right - box.left, height = box.bottom - box.top;
return width * height >= extPlayer.flashAttr.flashMinS &&
width <= height * 4 && 'true' == obj.AllowFullScreen &&
(obj.getAttribute('id') != 'ad_5_crazy_object');
} catch (e) {
}
},
stretchAncestors: function(node, win) {
try {
var doc;
if (win) {
doc = win.document;
} else {
doc = document;
}
var parent = node.parentNode;
if (doc.body == parent || doc.body == node) {
return;
}
var cssText = parent.style.cssText;
extPlayer.flashAttr.ancesterWHArr.push({ node: parent, cssText: parent.style.cssText });
if ('video.sina.com.cn' == location.host) {
parent.style.position = 'absolute';
}
parent.style.top = '0px';
parent.style.left = '0px';
parent.style.width = '10000px';
parent.style.height = '120000px';
parent.style.textAlign = 'left';
if (parent.nextSibling || parent.previousSibling) {
parent.style.float = 'none';
if (parent.nextSibling) {
var node = parent.nextSibling;
while (node) {
extPlayer.flashAttr.siblingCssArr.push({ display: node.style ? node.style.display : '', ele: node });
if (node.style) {
node.style.display = 'none';
}
node = node.nextSibling;
}
}
if (parent.previousSibling) {
var node = parent.previousSibling;
while (node) {
extPlayer.flashAttr.siblingCssArr.push({ display: node.style ? node.style.display : '', ele: node });
if (node.style) {
node.style.display = 'none';
}
node = node.previousSibling;
}
}
}
extPlayer.action.stretchAncestors(parent, win);
} catch (e) {
}
},
recoverAncestors: function(node) {
try {
for (var i = 0; i < extPlayer.flashAttr.ancesterWHArr.length; ++i) {
var recoverNode = extPlayer.flashAttr.ancesterWHArr;
recoverNode.node.style.cssText = recoverNode.cssText;
}
for (var i = 0; i < extPlayer.flashAttr.siblingCssArr.length; ++i) {
var node = extPlayer.flashAttr.siblingCssArr;
if (node.ele.style) {
node.ele.style.display = node.display;
}
}
} catch (e) {
}
},
showBtn: function(x, y) {
var obj = document.elementFromPoint(x, y);
var box = ExtPlayerUtil.getElementViewRect(obj);
var offset = ExtPlayerUtil.getOffset();
extPlayer.flashAttr.btnPlay.style.left = (box.right + offset.xOffset - 165) + 'px';
if (box.top + offset.yOffset - 29 > 0) {
extPlayer.flashAttr.btnPlay.style.top = (box.top + offset.yOffset - 29) + 'px';
} else {
extPlayer.flashAttr.btnPlay.style.top = '0px';
}
extPlayer.flashAttr.btnPlay.style.width = '164px';
extPlayer.flashAttr.btnPlay.style.height = '29px';
extPlayer.flashAttr.btnPlay.style.display = '';
extPlayer.flashAttr.node = obj;
}
},
callBacks: {
mouseoverBtn: function() {
try {
extPlayer.flashAttr.hoverImg.setAttribute("src", 'qqbrowser://extension/{5062F1C6-D76B-43c8-ADAE-D060662C6546}/alone_hover.png');
extPlayer.flashAttr.btnPlay.style.display = "";
} catch (e) {
}
},
mouseoutBtn: function() {
try {
extPlayer.flashAttr.hoverImg.setAttribute("src", 'qqbrowser://extension/{5062F1C6-D76B-43c8-ADAE-D060662C6546}/alone_normal.png');
} catch (e) {
}
},
mousedownBtn: function() {
try {
extPlayer.flashAttr.hoverImg.setAttribute("src", 'qqbrowser://extension/{5062F1C6-D76B-43c8-ADAE-D060662C6546}/alone_down.png');
} catch (e) {
}
},
go: function(extract) {
try {
if (extPlayer.flashAttr.begin) {
return;
}
extPlayer.flashAttr.nodeCssText = extPlayer.flashAttr.style ? extPlayer.flashAttr.style.cssText : '';
extPlayer.flashAttr.begin = true;
extPlayer.flashAttr.btnPlay.style.display = 'none';
if (null == extPlayer.flashAttr.node) {
extPlayer.flashAttr.node = extPlayer.action.getFlash();
}
extPlayer.flashAttr.ancesterWHArr = new Array();
extPlayer.flashAttr.siblingCssArr = new Array();
if (window != window.top) {
var ifr = window.frameElement;
var box = ExtPlayerUtil.getElementViewRect(ifr);
extPlayer.flashAttr.ifrWidth = ifr.width ? ifr.width : box.right - box.left;
extPlayer.flashAttr.ifrHeight = ifr.height ? ifr.height : box.bottom - box.top;
extPlayer.flashAttr.node.style.position = 'absolute';
//iframeеƵܻᵽλãϷ
extPlayer.flashAttr.node.style.top = (box.top + 1000) + 'px';
window.resizeTo(30000, 30000);
extPlayer.action.stretchAncestors(ifr, window.top);
}
var box = ExtPlayerUtil.getElementViewRect(extPlayer.flashAttr.node);
var doc = window.top.document;
var html = doc.getElementsByTagName('html')[0];
html.style.overflow = 'hidden';
doc.body.style.overflow = 'hidden';
doc.body.setAttribute('scroll', 'no');
if (extPlayer.flashAttr.node.width) {
extPlayer.flashAttr.hasWidth = true;
extPlayer.flashAttr.tmpNode.width = extPlayer.flashAttr.node.width;
} else {
extPlayer.flashAttr.hasWidth = false;
extPlayer.flashAttr.tmpNode.width = box.right - box.left + 'px';
}
if (extPlayer.flashAttr.node.height) {
extPlayer.flashAttr.hasHeight = true;
extPlayer.flashAttr.tmpNode.height = extPlayer.flashAttr.node.height;
} else {
extPlayer.flashAttr.hasHeight = false;
extPlayer.flashAttr.tmpNode.height = box.bottom - box.top + 'px';
}
//Ϊ˷ֹwidthheight100%洰ڱĺܴ
extPlayer.flashAttr.node.width = box.right - box.left + 'px';
extPlayer.flashAttr.node.height = box.bottom - box.top + 'px';
extPlayer.flashAttr.tmpNode.marginLeft = extPlayer.flashAttr.node.style.marginLeft;
extPlayer.flashAttr.tmpNode.marginRight = extPlayer.flashAttr.node.style.marginRight;
extPlayer.flashAttr.node.style.marginLeft = '0px';
extPlayer.flashAttr.node.style.marginRight = '0px';
if (!('www.4399.com' == location.host ||
'v.ifeng.com' == location.host ||
'www.zealer.com' == location.host ||
'video.sina.com.cn' == location.host ||
'c.t.qq.com' == location.host)) {
extPlayer.action.stretchAncestors(extPlayer.flashAttr.node);
}
extPlayer.flashAttr.canSetFlashSize = true;
extPlayer.flashAttr.refreshAxTimerId = setInterval(extPlayer.action.refreshAxPos, 500);
if ('noextract' != extract) {
setTimeout(function() {
window.external.ExtractFlash(box.left, box.top, box.right, box.bottom);
}, 0);
}
else {
extPlayer.action.refreshAxPos();
setTimeout(function() {
window.external.refreshFlashTitle();
window.external.refreshFlashSize();
}, 0);
}
} catch (e) {
}
},
onGlobalMouseOver: function(event) {
try {
if (!extPlayer.flashAttr.begin) {
var obj = event.srcElement;
var tagname = obj.tagName.toLowerCase();
if ('object' == tagname || 'embed' == tagname) {
if ('notpop' == window.external.ispop()) {
if (extPlayer.action.isFlash(obj)) {
if (null != extPlayer.flashAttr.dissapearTimerId) {
clearInterval(extPlayer.flashAttr.dissapearTimerId);
extPlayer.flashAttr.dissapearTimerId = null;
}
var box = ExtPlayerUtil.getElementViewRect(obj);
var offset = ExtPlayerUtil.getOffset();
extPlayer.flashAttr.btnPlay.style.left = (box.right + offset.xOffset - 165) + 'px';
if (box.top + offset.yOffset - 29 > 0) {
extPlayer.flashAttr.btnPlay.style.top = (box.top + offset.yOffset - 29) + 'px';
} else {
extPlayer.flashAttr.btnPlay.style.top = '0px';
}
extPlayer.flashAttr.btnPlay.style.width = '164px';
extPlayer.flashAttr.btnPlay.style.height = '29px';
extPlayer.flashAttr.btnPlay.style.display = '';
extPlayer.flashAttr.node = obj;
} else {
extPlayer.flashAttr.btnPlay.style.display = 'none';
}
}
}
}
} catch (e) {
}
},
onGlobalMouseOut: function(event) {
try {
if (!extPlayer.flashAttr.begin) {
var obj = event.srcElement;
var tagname = obj.tagName.toLowerCase();
if ('object' == tagname || 'embed' == tagname) {
if ('notpop' == window.external.ispop()) {
extPlayer.flashAttr.dissapearTimerId = setTimeout(function() {
extPlayer.flashAttr.btnPlay.style.display = 'none';
}, 1500);
}
}
}
} catch (e) {
}
}
}
};
try{
if ('true' == document.body.contentEditable || 'true' == document.body.canEditable || 'true' == document.body.contenteditable){
}else{
ExtPlayerUtil.EventUtil.addHandler(document.body, 'mouseover', extPlayer.callBacks.onGlobalMouseOver);
ExtPlayerUtil.EventUtil.addHandler(document.body, 'mouseout', extPlayer.callBacks.onGlobalMouseOut);
extPlayer.action.initHover();
}
}catch(e){
}
}
}
}
catch (e) {
}extPlayer.action.showBtn(376,150)</script> |