Add post-video redirect to YouTube URL from env config.
After the intro finishes, users are redirected to POST_VIDEO_REDIRECT_URL loaded via generated config.js for dev, Docker, and Dokploy deployments. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -154,8 +154,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/config.js"></script>
|
||||
<script>
|
||||
const config = window.SLAVIC_PULSE_CONFIG || {};
|
||||
const VIDEO_ID = 'kujXXtoHUbc';
|
||||
const POST_VIDEO_REDIRECT_URL = config.postVideoRedirectUrl || '';
|
||||
const BG_IMAGE = '/assets/imgs/www-bg-slavic-pulse-com-001.jpg';
|
||||
let player;
|
||||
|
||||
@@ -239,6 +242,9 @@
|
||||
function onPlayerStateChange(event) {
|
||||
if (event.data === YT.PlayerState.ENDED) {
|
||||
stageVideo.classList.remove('active');
|
||||
if (POST_VIDEO_REDIRECT_URL) {
|
||||
window.location.href = POST_VIDEO_REDIRECT_URL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user