Commit a0e179f8 by Masaru Abe

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

parent 3debc584
......@@ -4758,36 +4758,57 @@ CONTENTVIEW.showVideoObject = function(x, y, width, height, src, isFullscreen) {
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);
if (isFullscreen === false) {
$('#playvideo').attr('z-order', '10000');
$('#playvideo').css('left', pt1.x + 'px');
$('#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>'
);
}
//#17378 Chromeで差し替え動画の再生ボタンを連続クリックすると、動画が再生されなくなる問題の対応
var isCreateVideo = true;
if($('#videoOnPage').length){
//表示位置が同じか判定
var pos = $('#playvideo').position();
if(pos.left == pt1.x && pos.top == pt1.y){
isCreateVideo = false;
}
}
if($('#videoOnPage').length && !isCreateVideo){
//ソースのみ入替え
var videoObj = document.getElementById('videoOnPage');
videoObj.setAttribute("src", src);
videoObj.load();
} else {
$('#playvideo').attr('z-order', '10000');
$('#playvideo').css('left', pt1.x + 'px');
$('#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 {
$('#playvideo').attr('z-order', '1000');
$('#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