Commit a0e179f8 by Masaru Abe

#17378 Chromeで差し替え動画の再生ボタンを連続クリックすると、動画が再生されなくなる

parent 3debc584
...@@ -4758,36 +4758,57 @@ CONTENTVIEW.showVideoObject = function(x, y, width, height, src, isFullscreen) { ...@@ -4758,36 +4758,57 @@ CONTENTVIEW.showVideoObject = function(x, y, width, height, src, isFullscreen) {
pt1.y = pt1.y - CONTENTVIEW.marginY; pt1.y = pt1.y - CONTENTVIEW.marginY;
} }
//CONTENTVIEW_GETDATA.getPosVideo(x, y, (pt2.x - pt1.x), (pt2.y - pt1.y));
CONTENTVIEW_GETDATA.getPosVideo(x, y, width, height); CONTENTVIEW_GETDATA.getPosVideo(x, y, width, height);
if (isFullscreen === false) { if (isFullscreen === false) {
$('#playvideo').attr('z-order', '10000');
$('#playvideo').css('left', pt1.x + 'px'); //#17378 Chromeで差し替え動画の再生ボタンを連続クリックすると、動画が再生されなくなる問題の対応
$('#playvideo').css('top', pt1.y + 'px'); var isCreateVideo = true;
$('#playvideo').children().remove(); if($('#videoOnPage').length){
if (ClientData.userOpt_videoMode() == "1") {/* loop video */ //表示位置が同じか判定
$('#playvideo').html('<video class="mov" id="videoOnPage" ' + var pos = $('#playvideo').position();
'width="' + (pt2.x - pt1.x) + '" ' + if(pos.left == pt1.x && pos.top == pt1.y){
'height="' + (pt2.y - pt1.y) + '" ' + isCreateVideo = false;
'autoplay controls loop>' + }
' <source src="' + src + '" type="video/mp4"> ' +
//' <source src="' + src + '&key=' + (new Date()).toIdString() + '" type="video/mp4"> ' + }
//' <source src="' + src + '&key=' + (new Date()).toIdString() + '" type="video/ogg"> ' +
'</video>' if($('#videoOnPage').length && !isCreateVideo){
); //ソースのみ入替え
var videoObj = document.getElementById('videoOnPage');
} else { videoObj.setAttribute("src", src);
$('#playvideo').html('<video class="mov" id="videoOnPage"' + videoObj.load();
'width="' + (pt2.x - pt1.x) + '" ' +
'height="' + (pt2.y - pt1.y) + '" ' + } else {
'autoplay controls>' +
//' <source src="' + src + '&key=' + (new Date()).toIdString() + '" type="video/mp4"> ' + $('#playvideo').attr('z-order', '10000');
' <source src="' + src + '" type="video/mp4"> ' + $('#playvideo').css('left', pt1.x + 'px');
'</video>' $('#playvideo').css('top', pt1.y + 'px');
); $('#playvideo').children().remove();
}
if (ClientData.userOpt_videoMode() == "1") {/* loop video */
$('#playvideo').html('<video class="mov" id="videoOnPage" ' +
'width="' + (pt2.x - pt1.x) + '" ' +
'height="' + (pt2.y - pt1.y) + '" ' +
'autoplay controls loop>' +
' <source src="' + src + '" type="video/mp4"> ' +
//' <source src="' + src + '&key=' + (new Date()).toIdString() + '" type="video/mp4"> ' +
//' <source src="' + src + '&key=' + (new Date()).toIdString() + '" type="video/ogg"> ' +
'</video>'
);
} else {
$('#playvideo').html('<video class="mov" id="videoOnPage"' +
'width="' + (pt2.x - pt1.x) + '" ' +
'height="' + (pt2.y - pt1.y) + '" ' +
'autoplay controls>' +
//' <source src="' + src + '&key=' + (new Date()).toIdString() + '" type="video/mp4"> ' +
' <source src="' + src + '" type="video/mp4"> ' +
'</video>'
);
}
}
} else { } else {
$('#playvideo').attr('z-order', '1000'); $('#playvideo').attr('z-order', '1000');
$('#playvideo').html('<video class="mov" id="videoOnPage" src="' + src + '" ' + $('#playvideo').html('<video class="mov" id="videoOnPage" src="' + src + '" ' +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment