Jump to content

Recommended Posts

Hello everyone i have a quick question to ask if i may.

 

On my website i have a presentation video on my homepage, with another 1 just made. What i want to do is when people view my website they see the first video as usual but after that finishes i would like it to switch to the next video which will then replace the first video is that possible in php?

Link to comment
https://forums.phpfreaks.com/topic/230111-cycle-through-videos/
Share on other sites

It depends on how you mean...

 

If you're looking to show a video randomly, sure, just put the video links into an array and pick a random element from it for linking in.

 

If you want someone to see the first video until they have watched it, but then they only see the next video, etc. then you could set a cookie on their system with the id or name of the last vid they watched. Check that cookie when they get back, and load the next video instead.

 

 

Ah i see, my videos are both about 2 minutes long, and they both show the whole video on there own page but what i want for the homepage is lets say show the first 15 secs of video one then it to switch to video 2 to show 15 secs of that then the same again, so there not on the home page watching for minutes, any sort of code i could stat with here then i can do the rest, i would appreciate it?

 

I could do the whole array part and pick a random video, im just unsure on how to cut it after so many seconds.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.