v0.5.0: Enhanced Ohli24 Player UI, added Year Filtering, and optimized Anilife/Ohli24 extraction speed
This commit is contained in:
@@ -1318,40 +1318,51 @@ $(document).ready(function(){
|
||||
}, 100);
|
||||
});
|
||||
</script>
|
||||
<!-- Video Player Modal (Copied from List page) -->
|
||||
<!-- Video Player Modal -->
|
||||
<div class="modal fade" id="videoModal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" style="max-width: 90%; margin: 1.75rem auto;">
|
||||
<div class="modal-content" style="background: #0f172a; border: 1px solid rgba(16, 185, 129, 0.2); border-radius: 16px;">
|
||||
<div class="modal-dialog modal-xl" role="document">
|
||||
<div class="modal-content" style="background: #0f172a; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);">
|
||||
<div class="modal-header" style="border-bottom: 1px solid rgba(255,255,255,0.05); padding: 15px 20px;">
|
||||
<h5 class="modal-title" style="color: #ecfdf5; font-weight: 700; display: flex; align-items: center; gap: 10px;">
|
||||
<i class="fa fa-youtube-play" style="color: #10b981;"></i>
|
||||
<h5 class="modal-title" style="color: #f1f5f9; font-weight: 700; display: flex; align-items: center; gap: 10px;">
|
||||
<i class="fa fa-play-circle" style="color: #3b82f6;"></i>
|
||||
<span id="current-video-title">Video Player</span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color: #94a3b8; text-shadow: none; opacity: 1;">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" style="color: #f1f5f9; opacity: 1;">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body p-0" style="display: flex; flex-direction: column; height: 80vh;">
|
||||
<div style="flex-grow: 1; background: black; position: relative;">
|
||||
<video id="video-player" class="video-js vjs-big-play-centered vjs-theme-forest" controls preload="auto" style="width: 100%; height: 100%;"></video>
|
||||
</div>
|
||||
|
||||
<!-- Playlist Control Bar -->
|
||||
<div style="height: 60px; background: rgba(6, 78, 59, 0.3); border-top: 1px solid rgba(16, 185, 129, 0.1); display: flex; align-items: center; justify-content: space-between; padding: 0 20px;">
|
||||
<div style="display: flex; align-items: center; gap: 15px;">
|
||||
<button id="btn-prev-ep" class="playlist-nav-btn" title="이전 에피소드"><i class="fa fa-step-backward"></i></button>
|
||||
<button id="btn-next-ep" class="playlist-nav-btn" title="다음 에피소드"><i class="fa fa-step-forward"></i></button>
|
||||
<span id="playlist-progress" style="color: #d1fae5; font-weight: 600; font-size: 14px;"></span>
|
||||
</div>
|
||||
<button id="btn-toggle-playlist" class="playlist-toggle-btn active">
|
||||
<i class="fa fa-list"></i> 플레이리스트
|
||||
<div class="modal-body p-0">
|
||||
<div class="video-container" style="position: relative; overflow: hidden; background: #000;">
|
||||
<video id="video-player" class="video-js vjs-big-play-centered vjs-theme-fantasy" controls preload="auto" playsinline webkit-playsinline style="width: 100%; height: auto; max-height: 80vh;">
|
||||
<p class="vjs-no-js">JavaScript가 필요합니다.</p>
|
||||
</video>
|
||||
<!-- 화면 꽉 채우기 토글 버튼 -->
|
||||
<button id="btn-video-zoom" class="video-zoom-btn" title="화면 비율 조절">
|
||||
<i class="fa fa-expand"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Playlist Drawer -->
|
||||
<div id="playlist-list-container" style="height: 0px; background: rgba(2, 44, 34, 0.95); transition: height 0.3s ease; overflow-y: auto; border-top: 1px solid rgba(16, 185, 129, 0.1); display: none;">
|
||||
<div id="playlist-list" style="padding: 10px;">
|
||||
<!-- JS generated items -->
|
||||
|
||||
<!-- 플레이리스트 컨트롤 UI -->
|
||||
<div class="playlist-controls">
|
||||
<div class="playlist-header">
|
||||
<button id="btn-prev-ep" class="nav-btn" title="이전 에피소드">
|
||||
<i class="fa fa-chevron-left"></i>
|
||||
</button>
|
||||
<div class="playing-info">
|
||||
<div id="playlist-progress" class="progress-text"></div>
|
||||
</div>
|
||||
<button id="btn-next-ep" class="nav-btn" title="다음 에피소드">
|
||||
<i class="fa fa-chevron-right"></i>
|
||||
</button>
|
||||
<div class="control-group">
|
||||
<button id="btn-toggle-playlist" class="action-btn active" title="목록 토글">
|
||||
<i class="fa fa-list-ul"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="playlist-list-container" class="playlist-drawer" style="display: block;">
|
||||
<div id="playlist-list" class="playlist-grid"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1359,87 +1370,97 @@ $(document).ready(function(){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<link href="https://vjs.zencdn.net/7.20.3/video-js.css" rel="stylesheet" />
|
||||
<script src="https://vjs.zencdn.net/7.20.3/video.min.js"></script>
|
||||
<link href="https://vjs.zencdn.net/8.10.0/video-js.css" rel="stylesheet" />
|
||||
<script src="https://vjs.zencdn.net/8.10.0/video.min.js"></script>
|
||||
|
||||
<style>
|
||||
/* VideoJS Customization */
|
||||
.vjs-theme-forest { --vjs-theme-forest--emerald: #10b981; }
|
||||
.video-js.vjs-theme-forest .vjs-big-play-button { background-color: #10b981; border-color: #34d399; }
|
||||
/* Video Player Enhancements */
|
||||
.playlist-controls {
|
||||
padding: 16px;
|
||||
background: linear-gradient(to bottom, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 1));
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-bottom-left-radius: 12px;
|
||||
border-bottom-right-radius: 12px;
|
||||
}
|
||||
|
||||
.playlist-header { display: flex; align-items: center; gap: 15px; }
|
||||
.playing-info { flex: 1; min-width: 0; }
|
||||
.progress-text { color: #94a3b8; font-size: 13px; font-weight: 600; }
|
||||
|
||||
.nav-btn, .action-btn {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||
color: #fff;
|
||||
width: 36px; height: 36px;
|
||||
border-radius: 10px;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
transition: all 0.2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
.nav-btn:hover, .action-btn:hover { background: rgba(59, 130, 246, 0.2); border-color: #3b82f6; }
|
||||
.action-btn.active { background: #3b82f6; box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }
|
||||
|
||||
.playlist-nav-btn {
|
||||
width: 40px; height: 40px; background: linear-gradient(135deg, #10b981, #059669);
|
||||
border: none; border-radius: 50%; color: white; font-size: 14px;
|
||||
cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center;
|
||||
}
|
||||
.playlist-nav-btn:hover { transform: scale(1.1); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4); }
|
||||
.playlist-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
|
||||
.playlist-drawer {
|
||||
margin-top: 15px;
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
border-radius: 10px;
|
||||
padding: 10px;
|
||||
max-height: 250px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.playlist-grid { display: flex; flex-direction: column; gap: 4px; }
|
||||
.playlist-item {
|
||||
padding: 10px 15px;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border-radius: 8px;
|
||||
display: flex; align-items: center; gap: 12px;
|
||||
cursor: pointer; transition: all 0.2s;
|
||||
font-size: 13px; color: #cbd5e1;
|
||||
}
|
||||
.playlist-item:hover { background: rgba(255, 255, 255, 0.08); transform: translateX(5px); }
|
||||
.playlist-item.active { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); color: #60a5fa; font-weight: 700; }
|
||||
|
||||
.playlist-toggle-btn {
|
||||
padding: 8px 14px; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2);
|
||||
border-radius: 8px; color: #6ee7b7; font-size: 13px; cursor: pointer; transition: all 0.2s ease;
|
||||
}
|
||||
.playlist-toggle-btn:hover { background: rgba(16, 185, 129, 0.2); color: #ecfdf5; }
|
||||
.playlist-toggle-btn.active { background: rgba(16, 185, 129, 0.3); border-color: #10b981; color: #10b981; }
|
||||
/* Zoom Button overlay */
|
||||
.video-zoom-btn {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
right: 15px;
|
||||
z-index: 10;
|
||||
background: rgba(15, 23, 42, 0.6);
|
||||
backdrop-filter: blur(8px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.15);
|
||||
color: white;
|
||||
width: 38px; height: 38px;
|
||||
border-radius: 10px;
|
||||
opacity: 0; transition: opacity 0.3s;
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
}
|
||||
.video-container:hover .video-zoom-btn { opacity: 1; }
|
||||
.video-zoom-btn.active { background: #3b82f6; border-color: transparent; }
|
||||
|
||||
.playlist-item {
|
||||
padding: 10px 12px; border-radius: 6px; cursor: pointer; transition: all 0.2s;
|
||||
color: #d1fae5; font-size: 13px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid rgba(16, 185, 129, 0.05);
|
||||
}
|
||||
.playlist-item:hover { background: rgba(16, 185, 129, 0.1); color: #fff; }
|
||||
.playlist-item.active { background: rgba(16, 185, 129, 0.2); color: #10b981; font-weight: 600; border-left: 3px solid #10b981; }
|
||||
/* Video.js skin overrides */
|
||||
.video-js.vjs-theme-fantasy .vjs-big-play-button {
|
||||
background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(37, 99, 235, 0.9) 100%) !important;
|
||||
border: none !important;
|
||||
width: 90px !important; height: 90px !important;
|
||||
line-height: 90px !important;
|
||||
border-radius: 50% !important;
|
||||
box-shadow: 0 0 30px rgba(37, 99, 235, 0.6) !important;
|
||||
transition: all 0.3s ease !important;
|
||||
}
|
||||
.video-js.vjs-theme-fantasy .vjs-big-play-button .vjs-icon-placeholder:before {
|
||||
font-size: 60px !important;
|
||||
line-height: 90px !important;
|
||||
}
|
||||
|
||||
/* ========== Mobile Video Modal Fix ========== */
|
||||
@media (max-width: 768px) {
|
||||
/* 모달 크기 조정 */
|
||||
#videoModal .modal-dialog {
|
||||
margin: 10px auto !important;
|
||||
max-width: calc(100vw - 20px) !important;
|
||||
@media (max-width: 768px) {
|
||||
#videoModal .modal-dialog { width: 100% !important; margin: 0 !important; max-width: 100% !important; }
|
||||
#videoModal .modal-content { border-radius: 0 !important; height: 100vh; display: flex; flex-direction: column; }
|
||||
.video-container { flex: 1; display: flex; align-items: center; }
|
||||
.playlist-controls { padding-bottom: 25px; }
|
||||
.video-zoom-btn { opacity: 0.8; top: 10px; right: 10px; }
|
||||
}
|
||||
|
||||
/* 모달 바디 높이 조정 */
|
||||
#videoModal .modal-body {
|
||||
height: auto !important;
|
||||
max-height: 75vh !important;
|
||||
}
|
||||
|
||||
/* 비디오 높이 제한 */
|
||||
#video-player, .video-js {
|
||||
max-height: 40vh !important;
|
||||
}
|
||||
|
||||
/* 플레이리스트 높이 제한 */
|
||||
#playlist-list-container {
|
||||
max-height: 20vh !important;
|
||||
}
|
||||
|
||||
/* 플레이리스트 컨트롤 간소화 */
|
||||
.playlist-nav-btn {
|
||||
width: 32px !important;
|
||||
height: 32px !important;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
.playlist-toggle-btn {
|
||||
padding: 6px 10px !important;
|
||||
font-size: 11px !important;
|
||||
}
|
||||
|
||||
#playlist-progress {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 초소형 모바일 (400px 미만) */
|
||||
@media (max-width: 400px) {
|
||||
#video-player, .video-js {
|
||||
max-height: 35vh !important;
|
||||
}
|
||||
|
||||
#playlist-list-container {
|
||||
max-height: 15vh !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
@@ -1474,6 +1495,21 @@ function play_video(path, filename) {
|
||||
playVideoAtIndex(currentPlaylistIndex + 1);
|
||||
}
|
||||
});
|
||||
|
||||
// 비디오 줌/확장 처리
|
||||
$('#btn-video-zoom').click(function() {
|
||||
const $video = $('#video-player_html5_api');
|
||||
$(this).toggleClass('active');
|
||||
if ($(this).hasClass('active')) {
|
||||
$video.css({'object-fit': 'cover', 'height': '100%'});
|
||||
$(this).find('i').removeClass('fa-expand').addClass('fa-compress');
|
||||
$.notify('화면을 꽉 채웠습니다.', {type: 'info', delay: 1000});
|
||||
} else {
|
||||
$video.css({'object-fit': 'contain', 'height': 'auto'});
|
||||
$(this).find('i').removeClass('fa-compress').addClass('fa-expand');
|
||||
$.notify('원래 비율로 복원되었습니다.', {type: 'info', delay: 1000});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
playVideoAtIndex(currentPlaylistIndex);
|
||||
@@ -1569,13 +1605,7 @@ $('#btn-next-ep').click(function() { playVideoAtIndex(currentPlaylistIndex + 1);
|
||||
$('#btn-toggle-playlist').click(function() {
|
||||
$(this).toggleClass('active');
|
||||
var container = $('#playlist-list-container');
|
||||
if (container.is(':visible')) {
|
||||
container.css('height', '0');
|
||||
setTimeout(function() { container.hide(); }, 300);
|
||||
} else {
|
||||
container.show();
|
||||
setTimeout(function() { container.css('height', '200px'); }, 10);
|
||||
}
|
||||
container.slideToggle(300);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user