1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 09:32:12 +01:00

[Click2Flash] Fix playing YouTube videos with Qt5

Closes #1283
This commit is contained in:
David Rosca 2014-04-09 22:52:41 +02:00
parent 646f9a2013
commit e4512ae14f

View File

@ -233,24 +233,23 @@ void ClickToFlash::load()
qz_c2f_substituteElement.width = this.width; qz_c2f_substituteElement.width = this.width;
qz_c2f_substituteElement.height = this.height; qz_c2f_substituteElement.height = this.height;
qz_c2f_substituteElement.type = "application/futuresplash";
this.parentNode.replaceChild(qz_c2f_substituteElement, this); this.parentNode.replaceChild(qz_c2f_substituteElement, this);
setTimeout(function(){ setTimeout(function(){
qz_c2f_parentNode.replaceChild(qz_c2f_clone, qz_c2f_substituteElement); qz_c2f_parentNode.replaceChild(qz_c2f_clone, qz_c2f_substituteElement);
}, 250); }, 250);
*/ */
acceptedUrl = m_url; acceptedUrl = m_url;
acceptedArgNames = m_argumentNames; acceptedArgNames = m_argumentNames;
acceptedArgValues = m_argumentValues; acceptedArgValues = m_argumentValues;
m_element.setAttribute("type", "application/futuresplash");
QString js = "var qz_c2f_clone=this.cloneNode(true);var qz_c2f_parentNode=this.parentNode;" QString js = "var qz_c2f_clone=this.cloneNode(true);var qz_c2f_parentNode=this.parentNode;"
"var qz_c2f_substituteElement=document.createElement(this.tagName);" "var qz_c2f_substituteElement=document.createElement(this.tagName);"
"qz_c2f_substituteElement.width=this.width;qz_c2f_substituteElement.height=this.height;" "qz_c2f_substituteElement.width=this.width;qz_c2f_substituteElement.height=this.height;"
"qz_c2f_substituteElement.type=\"application/futuresplash\";"
"this.parentNode.replaceChild(qz_c2f_substituteElement,this);setTimeout(function(){" "this.parentNode.replaceChild(qz_c2f_substituteElement,this);setTimeout(function(){"
"qz_c2f_parentNode.replaceChild(qz_c2f_clone,qz_c2f_substituteElement);},250);"; "qz_c2f_parentNode.replaceChild(qz_c2f_clone,qz_c2f_substituteElement);},250);";