Copy link to clipboard
Copied
hey gang -
trying to add fullscreen video to my slideshow-
https://toddheymandirector.com/index_video.html
please excuse the sloppy code Ive been trying all sorts of things (apologies particularly to you Osgood)
Two major issues.. I dont want the controls to show and i want the video to autoplay..
i added a poster frame but the vid still loads small and pops large which is jarring..
and also pops back to the poster frame before it dissolves to the next which is awful--
finally there is a broken image link (blank.gif) that i cant find anywhere in my code
ideally i want it to look like this - but fullscreen--
thank you!
@REELHERO- you can do something very similar to the example you showed:
Store your video information in an array of javascript objects (see the full page code below, name and title. Change to your video names and titles. Add however many name and titles you need. Include a comma after each line, except for the last entry).
Store your actual video files in a folder named 'movies'. You can name the folder what you like BUT the code below looks for the videos in a folder named 'movies' - (video.sr
...i also noticed the video does not resize to fit the browser window - it crops the vid and unfortuntely i cant have that since its a showcase site - see the reference site -https://smugglersite.com/ if you resize the browser- the video resizes
By @REELHERO
No, the video is cropped to fit the screen. Look at the site on mobile in portrait orientation and then landscape orientation. You can't have a full page video or image without some part being cropped.
...one more thing - how would i slide up bu
---
1) for some reason the first vid doesnt show (ocean2.mp4) even though it is linked correctly..
By @REELHERO
You havent updated the javascript correctly. The 'default when page loads' should be as follows:
// Default when page loads
setTimeout(function() {
videoText.classList.add('slideUp' , 'fullOpacity');
setTimeout(function(){
video.classList.add('fullOpacity');
},100);
},300);
...Boom- you are wonderful and generous 🙂
2) still having the order issue it jumps from the opening vid (todd heyman) to
Unfortunately you have mangled the code l originally provided where its getting time consuming to keep putting it right. You can't successfully combine font sizes set in em and then just randomly guess at some percentage size to set for text within a container which has been set using em, it's a complete mess and why you are getting unwanted vertical space. I mean why on earth have you set bottom padding using viewport width instead of px or em, it makes no sense.
As for time delay yes of cours
...See updated code below. Radical amendments to the code but should need very little changes to the code from your end - font and font sizes.
I've used the font-awesome 6 library to create the plus icons, its much cleaner.
Copy code, paste in a new document, save to your site folder and view.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Text Animation Delay</title>
<link rel="preconnect" href="https:...
could you point out where to adjust speed of fade and slide up in the script ?- i can guess but just to be sure
By @REELHERO
Try adjusting how long the transitions take:
transition: all 1s ease-in-out;
Plus you can set the 700 to less:
myInterval = setInterval(textAnimateFunc, 700);
However there's no real 100% way, apart from keep tinkering around with the various css/javascript settings.
Copy link to clipboard
Copied
works gorgeously
https://toddheymandirector.com/index_video4.html
its not optimum but i use a redirect for mobile devices and there Ill keep it at fullscreen once i place this on mobile-- bc of the portrait mode as you mentioned - Im no web designer (thought i promise i will clean up my code now that it works well ) and eventually I will employ one to take over when Im entirely focusing on direction..
So grateful for all your help!
By @REELHERO
Well you have big issues as it doesnt work now its NOT full screen! Reduce the browsers viewport and see the result. Users will have different width browser viewports so they will see a bit of a layout mess.
In my view its better off as a full screen application. Creatives can get the feel for a good production whether its cropped or not. Stick a button on each video which opens a modal overlay where the user can see the full view video, if you really need it.
Copy link to clipboard
Copied
youre right - Ill put it back --what do these guys do ? https://biscuitfilmworks.com/
theyre video seems pretty responsive - you have a better eye than i do.. whats different?
Copy link to clipboard
Copied
also https://sesler.com/
Copy link to clipboard
Copied
Both examples are cropping the videos, just reduce the browsers width NOT the height. You'll see the left and right side of the videos get cropped. If you reduce the width and height together then more of the full video shows as it remains proportional, just the same as the solution you are using.
Copy link to clipboard
Copied
ah - so its the same - maybe bc i know my work so well i notice it more--
ok - one final question- id like to reduce the verical space between just the first title "TODD HEYMAN - FILM DIRECTOR" i was able to reduce the size by adding a class with a percentate (brand_heyman, title_heyman) but i cant get the space between to change - ive used a negative margin, neg line height but it wont budge
Copy link to clipboard
Copied
and last last thing i promise - if i wanted to delay the h2 h4 and h5 lines so they stagger in slightly the way my menu titles come in (hit the hamburger menu on my page ) is nth-of-type css approach the only way to do that?
Copy link to clipboard
Copied
Gee whizz, you like to confuse the code, lol.
Amend the 'videoText' section to as below:
<div class="videoText">
<h2>todd heyman</h2>
<h4><span>+</span>film Director<span>+</span></h4>
</div>
Toss out the current 'videoText h2' and 'videoText h4' css and use the below:
.videoText h2 {
margin: 0 0 15px 0;
padding: 0;
font-size: 3em;
font-weight: normal;
font-family:'code_nextextrabold', san-serif;
color:#dc7f1d;
text-align: center;
text-transform: uppercase;
}
.videoText h4 {
margin: 0 0 15px 0;
padding: 0;
font-size: 1.2em;
font-family:'source_code_proregular', san-serif;
color: #ffbe79;
letter-spacing:.15em;
text-align: center;
text-transform: uppercase;
transition: all 1.5s ease-in-out;
}
Add in:
.videoText h4 span {
vertical-align: center;
line-height: normal;
display: inline-block;
margin-left:1.1em;
margin-right:1.1em;
font:'code_nextbold';
color: #d48246;
}
.videoText h5 span {
color: #dc7f1d;
}
Get rid of the following css:
.brand_heyman {
font-size: 43%;
}
.title_heyman {
font-size: 63%;
}
.dot {
color:#dc7f1d;
}
.cross {
font-size: 65%;
vertical-align: center;
line-height: normal;
display: inline-block;
margin-left:1.1em;
margin-right:1.1em;
font:'code_nextbold';
color: #d48246;
}
Update the javascript objects array from this:
const videos = [
{name: 'ocean2.mp4' , title: '<span class="brand_heyman">todd heyman</span>' , director: '<span class="cross">+</span><span class="title_heyman">film director</span><span class="cross">+</span>' , agency: ' '},
{name: 'nike_getaway.mp4' , title: 'Nike' , director: '<span class="smaller">+</span>the getaway<span class="smaller">+</span>', agency: 'Agency <span class="dot">•</span> Wieden & Kennedy'},
{name: 'vrbo.mp4' , title: 'vrbo' , director: '<span class="smaller">+</span>a family bond<span class="smaller">+</span>', agency: 'Agency <span class="dot">•</span> Saatchi London'},
{name: 'bartenura.mp4' , title: 'bartenura' , director: '<span class="smaller">+</span>the text<span class="smaller">+</span>' , agency: 'Agency <span class="dot">•</span> GGHC'}
];
To this:
const videos = [
{
name: 'ocean2.mp4' ,
title: 'todd heyman' ,
director: '<span>+</span>film director<span>+</span>' ,
agency: ' '
},
{
name: 'nike_getaway.mp4' ,
title: 'Nike' ,
director: '<span>+</span>the getaway<span>+</span>' ,
agency: 'Agency <span>•</span> Wieden & Kennedy'
},
{
name: 'vrbo.mp4' ,
title: 'vrbo' ,
director: '<span>+</span>a family bond<span>+</span>',
agency: 'Agency <span>•</span> Saatchi London'
},
{
name: 'bartenura.mp4' ,
title: 'bartenura' ,
director: '<span>+</span>the text<span>+</span>' ,
agency: 'Agency <span>•</span> GGHC'
}
];
Copy link to clipboard
Copied
what did i get wrong?
https://toddheymandirector.com/index_video44.html
i didnt see any animation delay code that would let 'title' and 'agency' slide up 3 milliseconds later each - thats the goal - and to have my line height in my name / film director tighter
Copy link to clipboard
Copied
basically i was trying to just reformat my todd heyman film director to be vertically closer together - the rest of the titles were perfect: https://toddheymandirector.com/index_video4.html
and yes have the "title" and "agency" slide up half a second later in succession
Copy link to clipboard
Copied
Unfortunately you have mangled the code l originally provided where its getting time consuming to keep putting it right. You can't successfully combine font sizes set in em and then just randomly guess at some percentage size to set for text within a container which has been set using em, it's a complete mess and why you are getting unwanted vertical space. I mean why on earth have you set bottom padding using viewport width instead of px or em, it makes no sense.
As for time delay yes of course it can be achieved but the javascript would most likely have to be rewritten to some extent.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
I totally understand - I kept trying different things to corect the problem and pasted other code to style the type (not best practices Im aware lol) I will go back to your code and reference, honor all the effort you gave me and clean it up.. and figure it all out myself..
The javascript may be a tough one to figure out but im nothing if not diligent.
Again thank you for lending me so much of your time and wisdom. Im seeking new representation soon and my presentation site (presentation counts in my world) is now sexier than ever thanks to you!
Copy link to clipboard
Copied
The javascript may be a tough one to figure out but im nothing if not diligent.
By @REELHERO
The approach for the javascript needs to be completely re-written as at the moment the only item that is being animated is the 'videoText' container. To have each line of text slide-up/fade-in, with a delay, means they would each have to be animated individually. Maybe an animation library such as 'animate' would be of use to you. You just add a link the library then add the css styles to the items you want animated:
Copy link to clipboard
Copied
i thought about that - i have an animate library in my css folder and use it - but couldnt figure out how to style it within the slide show:
{name: 'bartenura.mp4' , title: 'bartenura' , director: '<span class="cross">+</span>the text<span class="cross">+</span>' , agency: 'Agency <span class="dot">•</span> GGHC'}
like i do here:
<div class="th_logo_white faded slideRight"><a href="http://toddheymandirector.com/"><img src="http://toddheymandirector.com/Images/home/THLOGO.png" alt="image" width="28px" height="44px"></a></div>
Copy link to clipboard
Copied
I've never used animate.css so I dont know. If you still need a solution for the individual lines of text to slide up/fade in, with a delay, let me know. I might be able to allocate some time to getting it to work.
Copy link to clipboard
Copied
i do - i was just to about go live with the page (right now its still a test) and try and figure it out later
But Im respectful of your time - youve been my greatest ally in this community and Ive learned so much from you and i dont want to overstep..
Copy link to clipboard
Copied
Give me about 30mins and I'll post an updated version. It's going to be a radical change, particularly the javascript.
Copy link to clipboard
Copied
See updated code below. Radical amendments to the code but should need very little changes to the code from your end - font and font sizes.
I've used the font-awesome 6 library to create the plus icons, its much cleaner.
Copy code, paste in a new document, save to your site folder and view.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Text Animation Delay</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Frank+Ruhl+Libre:wght@300;400&display=swap" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" rel="stylesheet">
<style>
body {
margin: 0;
font-family: 'Frank Ruhl Libre', serif;
}
.videoShowcase {
display: flex;
flex-direction: column;
height: 100vh;
width: 100vw;
justify-content: center;
align-items: center;
overflow: hidden;
}
.videoContainer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
background-color: #000;
}
.videoContainer::after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
content: '';
background-color: rgba(0, 0, 0, 0.3);
}
.videoContainer video {
min-width: 100%;
min-height: 100%;
object-fit: cover;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
transition: all 700ms ease-in-out;
opacity: 0;
}
.videoText {
text-align: center;
transition: opacity 700ms ease-in-out;
}
.videoText h2 {
margin: 0 0 12px 0;
padding: 0;
font-size: 42px;
line-height: 52px;
letter-spacing: 1px;
text-transform: uppercase;
color: #dc7f1d;
transition: all 1s ease-in-out;
opacity: 0;
}
.videoText h4 {
display: flex;
align-items: center;
justify-content: center;
margin: 0 0 12px 0;
padding: 0;
color: #ffbe79;
font-size: 22px;
line-height: 32px;
letter-spacing: 1px;
text-transform: uppercase;
transition: all 1s ease-in-out;
opacity: 0;
}
.videoText h4::before {
content: "\2b";
margin: 0 10px 0 0;
font-size: 18px;
color: #dc7f1d;
}
.videoText h4::after {
content: "\2b";
margin: 0 0 0 10px;
font-size: 18px;
color: #dc7f1d;
}
.videoText h5 {
margin: 0;
padding: 0;
font-size: 16px;
line-height: 26px;
letter-spacing: 1px;
text-transform: uppercase;
color: #ffbe79;
transition: all 1s ease-in-out;
opacity: 0;
}
.textAnimate {
transform: translateY(200px);
}
.slideUp {
transform: translateY(0);
}
.fadeOut {
opacity: 0;
}
.fadeIn {
opacity: 1!important;
}
</style>
</head>
<body>
<section class="videoShowcase">
<div class="videoContainer">
<video class="video" src="movies/ocean2.mp4" autoplay muted></video>
</div>
<div class="videoText">
<h2 class="textAnimate">todd heyman</h2>
<h4 class="textAnimate">film director</h4>
<h5 class="textAnimate"></h5>
</div>
</section>
<script>
const videoTitle = document.querySelector('.videoText h2');
const videoDirector = document.querySelector('.videoText h4');
const videoAgency = document.querySelector('.videoText h5');
const videos = [
{
name: 'ocean2.mp4',
title: 'todd heyman',
director: 'film director',
agency: ''
},
{
name: 'nike_getaway.mp4',
title: 'Nike',
director: 'the getaway',
agency: 'Agency • Wieden & Kennedy'
},
{
name: 'vrbo.mp4' ,
title: 'vrbo' ,
director: 'a family bond',
agency: 'Agency • Saatchi London'
},
{
name: 'bartenura.mp4' ,
title: 'bartenura' ,
director: 'the text',
agency: 'Agency • GGHC'
},
]
const textAnimate = document.querySelectorAll('.textAnimate');
const videoText = document.querySelector('.videoText');
const video = document.querySelector('.video');
let videoCount = 0;
let myInterval;
// fade in default video on page load
setTimeout(function(){
video.classList.add('fadeIn');
}, 100);
// Text animation
function startTextAnimation() {
let count = 0;
myInterval = setInterval(textAnimateFunc, 700);
function textAnimateFunc() {
if(count === textAnimate.length) {
count = 0;
clearInterval(myInterval);
}
textAnimate[count].classList.add('slideUp' , 'fadeIn');
count++;
}
}
// Call startTextAnimation function on page load
startTextAnimation();
// Update video and video information every 7 seconds
setInterval(function() {
videoText.classList.add('fadeOut');
video.classList.remove('fadeIn');
// Remove slideUp/fadeIn css classes from text
setTimeout(function() {
textAnimate.forEach(function(textAnimate) {
textAnimate.classList.remove('slideUp' , 'fadeIn');
});
}, 1000)
setTimeout(function() {
videoText.classList.remove('fadeOut');
video.classList.add('fadeIn');
videoTitle.innerHTML = `${videos[videoCount].title}`;
videoDirector.innerHTML = `${videos[videoCount].director}`;
videoAgency.innerHTML = `${videos[videoCount].agency}`;
video.src=`movies/${videos[videoCount].name}`;
}, 1500)
// Call startTextAnimation function
setTimeout(function() {
startTextAnimation();
}, 1000);
// Keep count of video to show
videoCount++;
if(videoCount > videos.length - 1) {
videoCount = 0;
}
}, 7000);
</script>
</body>
</html>
Copy link to clipboard
Copied
its killer - thank you for this - how kind!
https://toddheymandirector.com/index_video_delay.html
when i stylize to match ill try and keep it clean like that
heres the current site
https://toddheymandirector.com/
could you point out where to adjust speed of fade and slide up in the script ?- i can guess but just to be sure
also - ive used font awesome - i went with a bolder plus icon - maybe theres one in font awesome that matches or increase the font weight--
thank you !!
Copy link to clipboard
Copied
could you point out where to adjust speed of fade and slide up in the script ?- i can guess but just to be sure
By @REELHERO
Try adjusting how long the transitions take:
transition: all 1s ease-in-out;
Plus you can set the 700 to less:
myInterval = setInterval(textAnimateFunc, 700);
However there's no real 100% way, apart from keep tinkering around with the various css/javascript settings.
Copy link to clipboard
Copied
that is what ill do - I have to head out but I will tinker and send you what Ive done - thank you a ton for this!
Copy link to clipboard
Copied
its choppy
https://toddheymandirector.com/index_video_delay.html
and should feel more like in speed and flow
but Im getting there
Copy link to clipboard
Copied
its choppy
https://toddheymandirector.com/index_video_delay.html
and should feel more like in speed and flow
but Im getting there
By @REELHERO
Well that's your fault for altering the speed, looks a bit crazy now, too fast. There was nothing wrong with the original speed.
The example you provided is completely different so you can't really compare.
I can only provide what l feel looks acceptable. If you disagree, start altering what l provided, without really knowing what you are doing, then don't like it, find an alternative solution. You're starting to become like some high maintenance client whose never quite happy.
I don't think the result of the code l provided is that different from the original smugglers website that you provided as an example. Infact its a subtle improvement given the text slides up, fades in and has a delay.
Good luck with your project.
Copy link to clipboard
Copied
Its completely my fault! I wa suggesting otherwise.. Your solution is elegant and yes better than the smuggler reference 1000%, I was simply trying to get the titles to slightly overlap like the reference above ( so they dont happen in succession but move like a ripple) and yes its choppy bc its moving too fast now. I get it. And Ill get there. You cant be surprised Im a perfectionist that is literally my job lol.. and this site is my calling card I have to trust my gut on it. Its representing more than a decade of all my work.
I am enormously grateful for all your help! youve been beyond generous with your time. All the best-T
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more