Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > RocketCake
jump from .mp4 end to new website . . .

cyberam
Registered User
Quote
2024-03-04 11:47:29

Advise or help needed. I'm designer and no programer and as such run into a problem I need expertise. My website opens with a full screen .mp4 movie for iPhone 11. At the end of the movie I would like it to jump from the last pic to another website or show a link to it. I've tried different things with containers and links but to no avail. Guess it needs a javascript I can't write or implement myself. I'm really desperate for help and even would pay for a solution.


rsifontes
Registered User
Quote
2024-03-04 14:00:30

Hi Wolfgang, you definitely need to use Javascript. You can create a function that detects when the video/audio has reached its end and when that happens you can redirect to the website you mention or execute any other action.
Greetings and success with your project.



cyberam
Registered User
Quote
2024-03-04 15:49:55

Thank you, I'd thought so too. Can you or do you know someone who would take that job for a fee?


niko
Moderator
Quote
2024-03-04 15:58:07

Place your video using a HTML 5 video element on your website, then create a JavaScript Element on the same page and double click it. Put this code into there:

var videoelem = document.querySelector("video");

videoelem.addEventListener("ended", (evt) =>
{
window.location.href = 'https://www.example.com'
});


(replace the example.com url with the page your want to open once the video has finished playing)

That should do the trick.


cyberam
Registered User
Quote
2024-03-04 18:22:52

Thank you Nico, I am happy to see the light at the end of the tunnel. Just forgive me another dumb question, what is a Java Script [b]Element[|b] and where do I find it or choose the right one?


cyberam
Registered User
Quote
2024-03-04 18:36:04

Ok it's a double click to produce a JavaScript element, I'd thought to click the editor. I try now what you've said.


cyberam
Registered User
Quote
2024-03-04 19:04:44

Glory you Nico, thank you so much for your help, it works!
I now just need to find a way to hide your script that appears on top of my website now. Does it has to do something with the additional information that appears when I put the pointer on the JavaScript Code link in the menu?


erik
Registered User
Quote
2024-03-04 19:08:49

Just select the gray box and then in the property window, uncheck "create div around code", then it should disappear when clicking "preview"


raimcomputi
Registered User
Quote
2024-03-05 19:55:34

Just select the gray box and then in the property window, uncheck "create div around code", then it should disappear when clicking "preview"

This function does not exist for me in the Javascript element.


erik
Registered User
Quote
2024-03-06 07:40:09

You probably just overlooked it. Select the gray box, then on the left, in the property window, it's the second entry with a checkbox.


raimcomputi
Registered User
Quote
2024-03-06 19:07:34

You probably just overlooked it. Select the gray box, then on the left, in the property window, it's the second entry with a checkbox.

Funny, I could have sworn the feature wasn't there yesterday. Sometimes you already have tomatoes on your eyes.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "In?ernational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact