- This topic is empty.
April 23, 2014 at 6:53 am #168496SteveTheDolphinParticipant
Imagine I have a page with five videos on it.
I want this: when a person clicks on a video, the video instantly starts.
Then, when that person clicks on one of the other videos below, the first video instantly stops and the second video instantly begins.
So number one question is: does anyone know the code to insert into my HTML5/PHP/ETC responsive site which will tell the previous playing video to STOP instantly when someone clicks on a different video?
If someone posts a “clean” answer to that problem laid out above, then wonderful. I will send that person $20 with total gratitude.
If nobody knows how to do that, then please consider the explanation below about the “dirty” way I am currently fixing this, and if you can improve my “dirty” way there is also a $20 bill waiting for you as well:
Currently, here is the dirty way I’m getting around this problem:
I made 5 copies of that first page, and this way when someone goes to the original page and clicks on video #1, that automatically initiates a jump to a copy page known as “video #1 page” where video #1 starts playing instantly. Then, if the person watching video #1 on “video #1 page” decides to scroll down and watch one of the other videos on that copy page, for example, video #2, then guess what, same principle, clicking video #2 sends the person over to the copy page known as “video #2 page”, which has video #2 playing from the start, and video #1 NOT playing.
Thus, by having the original page with 5 videos sitting on it, PLUS 5 copies of that original page, the end result is that I get the “auto-stop” feature I want, namely, my viewers never have to hear two videos playing at once, and my viewers never have to stop the previous video. They click one video, watch a little, then click another video, watch a little of that, and thus each time they click a new video the old video seems to stop automatically.
Now here comes question #2, does anyone know how to make these jumps perfectly smooth?
Currently, when someone clicks on a video, the jump goes to a copy of the same page but the location they land on is not perfectly the location they started on.
For example, imagine that the person has currently scrolled down to a point where video #1 is in the middle of the page, but not necessarily perfectly in the middle. Now they click the video, which initiates a jump to the copy page which has video #1 playing instantly from the moment the person arrives. Now let’s discuss where the person arrives. My jump system has them land on the location of “the title that is written above video #1” – but that means that this jump is kind of noticeable, because suddenly the video box moves up a little, or down a little, because the person who was looking at the first page was not scrolled to EXACTLY the video title, they might have been scrolled a little above or a little below the video title.
So, now we arrive at the real question #2: what code should I use that says “Hey, when someone clicks on a video box, to start a video box rolling, make them jump to a copy page that has that video playing automatically, but first before making that jump check to see exactly where that person has scrolled down to right now, and make the landing point on the copy page be exactly at the same scroll location, so that the person really doesn’t notice at all (unless they looked at their address bar) that a jump even happened at all.”
If you have code that answers #2 (which would make my “dirty” jump unnoticeable, because the video box location would not change at all) I will send $20 with gratitude. And back to #1, if you have code that would stop the previous video from playing whenever a new video starts, then I don’t need to have any copy pages at all, I don’t need to do any jumping at all, the #1 solution would be best. So, I would gratefully pay $20 for the first person who posts code that will solve either #1 or #2.
Thank you. :-)
- The forum ‘Other’ is closed to new topics and replies.