In Tumult Hype 4, you can set a poster image for a video by setting a HTML Attribute on the Video element:
key: poster
value: ${resourcesFolderName}/poster-for-video.png
Note: Make sure you uncheck 'Automatically Optimize when Exporting' on your PNG, because Hype may convert it to a JPG if no transparency is detected.
Custom Video Element:
The 'poster' value can also be used in a regular video element. This image is what sets the initial frame prior to video playback: If you have posterimage.png in your resource library, you can use it like this:
Unfortunately, I am not able to upload the document due to agreements I have with the client.
I do understand this makes it difficult for you to help me.
But here is some more information about my query and lets see:
@ DBear
I indeed used the rectangle video element to upload the video. And then I used a separate photograph as its background.
Your suggestion to create two elements and overlap them is great. In my case: the photograph needs to be on the top (to start off with). Do you know how I can send it to the back when you hoover over it? Do I have to “Run Javascript” and then add a “new function” and then add some kind of code? Or do you think it’s best to make different timelines?
@Daniel
I am a bit of a newbie with Tumult, so I don’t really know what “poster value” means
I already used the following functions in order to get the video play and pause
document.getElementById(‘video1’).play();
document.getElementById(‘video1’).pause();
This is the code I found on the forum.
If there is a way of adding another code which instructs the element to show the background image by default, and then when you hoover over it the video appears and start playing, that would be amazing!
I read the tread but my case is a little bit different. I have a video with Java that makes it stop and play when you click on it. I don’t have any commands and I don’t want to.
I just want a poster picture of any frame (that I have already in PNG) to be there when the scene open on top of the video. Then, when we click on the video, I want the video to start like normal and the poster to disapear.
I am doing something wrong and I can’t figure out what. Can someone please take a look at the “Whole Health” scene in this file (scene 2)?
There are two videos in this scene. Both fade from black, so the first frame is black. I’m trying to get the videos to stop being shown as black boxes by loading the poster images “image1.png” and “image2.png” to show a more compelling preview. To do this, I created the setposter function as described here but I did something wrong and it’s not working. Thanks.
${resourcesFolderName} is the magic variable itself; this gets substituted on export by Hype so you want to keep that bit. It probably should be: ${resourcesFolderName}/frelin.png
Select the image in the resource library and make sure to uncheck “Automatically optimize when exporting” otherwise Hype may convert (and thus rename) the file.