부스트 이용안내 추가

This commit is contained in:
hyeonggil
2024-08-07 17:31:45 +09:00
parent f8f5fd98c3
commit 3597ea576f
10 changed files with 65 additions and 43 deletions

View File

@@ -718,9 +718,12 @@ function pdpIntro() {
let cookieVal;
$(".editorWarp").addClass("playing");
const youtubeId = $('.youtube-box').data('youtube');
const youtubeFrame = '<iframe src="https://www.youtube.com/embed/'+youtubeId+'?autoplay=1&controls=1&rel=0&showsearch=0" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
$('.editorWarp .youtube-box').html(youtubeFrame);
const youtubeId = $(".youtube-box").data("youtube");
const youtubeFrame =
'<iframe src="https://www.youtube.com/embed/' +
youtubeId +
'?autoplay=1&controls=1&rel=0&showsearch=0" title="YouTube video player" allow="accelerometer; autoplay; clipboard-black; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
$(".editorWarp .youtube-box").html(youtubeFrame);
switch (true) {
case $(".displayTheme").length > 0:
@@ -728,17 +731,9 @@ function pdpIntro() {
break;
case $(".inCarGame").length > 0:
cookieVal = "inCarGameIntro";
$(".video_wrap video").attr(
"poster",
"../assets/images/kia/pdp/in_car_game/intro_poster.png"
);
break;
case $(".srsPlus").length > 0:
cookieVal = "srsPlusIntro";
$(".video_wrap video").attr(
"poster",
"../assets/images/kia/pdp/srs_plus/intro_poster.png"
);
break;
}
@@ -746,7 +741,9 @@ function pdpIntro() {
`<span onclick="hideTodayIntroPopup('${cookieVal}')" style="cursor:pointer"><input type="checkbox"> 오늘 하루 재생하지 않기</span>`
);
$(".btn-intro").css({"display":"flex","opacity":"0", "top":"8rem"}).animate({"opacity":"1", "top":"5rem"},400);
$(".btn-intro")
.css({ display: "flex", opacity: "0", marginTop: "2rem" })
.animate({ opacity: "1", marginTop: "0" }, 400);
if (getCookie(cookieVal)) {
$(".editorWarp").removeClass("playing");
$(".video_wrap").css("display", "none");
@@ -759,7 +756,9 @@ function pdpIntro() {
`<span onclick="deleteCookie('${cookieVal}')" style="cursor:pointer"><input type="checkbox"> 오늘 하루 재생하지 않기</span>`
);
} else {
$(".video_wrap").css({"display":"flex","opacity":"0"}).animate({"opacity":"1"},200);
$(".video_wrap")
.css({ display: "flex", opacity: "0" })
.animate({ opacity: "1" }, 200);
$(".close-today").html(
`<span onclick="hideTodayIntroPopup('${cookieVal}')" style="cursor:pointer"><input type="checkbox"> 오늘 하루 재생하지 않기</span>`
);
@@ -774,7 +773,7 @@ function pdpIntro() {
if (getCookie(cookieVal)) {
$(".close-today input").attr("checked", "checked");
}
$('.editorWarp .youtube-box').html(youtubeFrame);
$(".editorWarp .youtube-box").html(youtubeFrame);
$(videoWrap).show();
// if (video) {
// video.currentTime = 0;
@@ -784,10 +783,10 @@ function pdpIntro() {
// .btn-close 버튼 클릭 시 비디오 숨기기
$(document).on("click", ".video_wrap .btn-close", function () {
console.log('btn close 실행');
// console.log("btn close 실행");
$(".editorWarp").removeClass("playing");
$(videoWrap).hide();
$('.editorWarp .youtube-box').empty();
$(".editorWarp .youtube-box").empty();
// if (video) {
// video.currentTime = 0;
// video.pause();