Loading src/webedit/video/video.cpp +18 −6 Changes for src/webedit/video/video.cpp: 18 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -344,13 +344,25 @@ extern "C" { if (controls) { video.setAttribute("controls", "controls"); } else if (playOnHover) { video.setAttribute("onclick", "if(this.dataset.hoverPlay==='1'){" "this.pause();this.dataset.hoverPlay='0';" "}else if(this.paused){" "this.dataset.clickPlay='1';this.dataset.hoverPlay='0';this.play();" "}else{" "this.dataset.clickPlay='0';this.pause();" "}"); video.setAttribute("onmouseenter", "if(this.dataset.clickPlay!=='1'&&this.paused){" "this.dataset.hoverPlay='1';this.play();" "}"); video.setAttribute("onmouseleave", "if(this.dataset.hoverPlay==='1'){" "this.pause();this.dataset.hoverPlay='0';" "}"); } else { video.setAttribute("onclick", "if(this.paused){this.dataset.clickPlay='1';this.play();}else{this.dataset.clickPlay='0';this.pause();}"); } if (playOnHover) { video.setAttribute("onmouseenter", "if(this.paused){this.dataset.hoverPlay='1';this.play();}"); video.setAttribute("onmouseleave", "if(this.dataset.hoverPlay==='1'){this.pause();this.dataset.hoverPlay='0';}"); video.setAttribute("onclick", "if(this.paused){this.play();}else{this.pause();}"); } std::string style; Loading Loading
src/webedit/video/video.cpp +18 −6 Changes for src/webedit/video/video.cpp: 18 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -344,13 +344,25 @@ extern "C" { if (controls) { video.setAttribute("controls", "controls"); } else if (playOnHover) { video.setAttribute("onclick", "if(this.dataset.hoverPlay==='1'){" "this.pause();this.dataset.hoverPlay='0';" "}else if(this.paused){" "this.dataset.clickPlay='1';this.dataset.hoverPlay='0';this.play();" "}else{" "this.dataset.clickPlay='0';this.pause();" "}"); video.setAttribute("onmouseenter", "if(this.dataset.clickPlay!=='1'&&this.paused){" "this.dataset.hoverPlay='1';this.play();" "}"); video.setAttribute("onmouseleave", "if(this.dataset.hoverPlay==='1'){" "this.pause();this.dataset.hoverPlay='0';" "}"); } else { video.setAttribute("onclick", "if(this.paused){this.dataset.clickPlay='1';this.play();}else{this.dataset.clickPlay='0';this.pause();}"); } if (playOnHover) { video.setAttribute("onmouseenter", "if(this.paused){this.dataset.hoverPlay='1';this.play();}"); video.setAttribute("onmouseleave", "if(this.dataset.hoverPlay==='1'){this.pause();this.dataset.hoverPlay='0';}"); video.setAttribute("onclick", "if(this.paused){this.play();}else{this.pause();}"); } std::string style; Loading