Problems with Home Page Slider
- This topic has 10 replies, 2 voices, and was last updated 9 years, 1 month ago by Christian Wach.
-
AuthorPosts
-
November 17, 2015 at 2:40 pm #5830Greg AcunaParticipant
Hope to really get into developing a social network for the Planet Earthlings project using Commons in a Box. Thanks all for this fascinating work.
Have tried a few things and not getting what I expect from the homepage slider. Have tried with four slides with the first one being an image, the second a YouTube playlist of four videos and then two more images.
This caused problem because if the person played the video the slider would continue cycling through the still images and not stay on the video.
Tried deleting everything except the video and now it says on the video, but it fades in and out every several seconds.
I’ve tried adjusting the Commons in a Box “Homepage” options, but I don’t see anything which would stop what I believe are the “transitions” from messing up the video while it is playing.
Thanks for any assistance.
November 17, 2015 at 2:50 pm #5831Greg AcunaParticipantBTW…is there a way to set a YouTube video so it plays automatically when someone comes to the site?
November 18, 2015 at 6:20 am #5832Christian WachParticipant@planetearthlings There is a solution to this Greg, but it’ll require a little technical work. How are your
git
skills? 🙂The solution is in two stages:
1. You will need to apply an outstanding Pull Request (which I shall bump to get agreement from other devs that it’s okay to merge) from the CBOX theme Github repo. Right now, this can be done in one step by downloading the zip of the entire theme from my branch. (Note to future readers: this link is likely to fail once the PR is merged) Alternatively, you can grab just the changed code by overwriting ‘themes/cbox/engine/includes/feature-slider/setup.php’ with the content of this link.
2. You will then need to install and enable an additional plugin which you can find on Github.
You can see the result on this site:
http://spirit-of-football.de/Cheers, Christian
November 18, 2015 at 6:22 am #5833Christian WachParticipantI would strongly recommend against auto-playing video. Especially with sound.
November 18, 2015 at 6:27 am #5834Christian WachParticipantHave tried with four slides with the first one being an image, the second a YouTube playlist of four videos and then two more images.
I should mention that my fix above hasn’t been tested with YouTube playlists, only with individual videos. Therefore if it doesn’t work the way you expect, try adding them individually to your slider.
November 18, 2015 at 7:25 am #5835Greg AcunaParticipantHey Christian…thanks so much for taking the time to share so many options for fixing this problem. Seems to me the easiest is to just copy and past the code for the setup.php you mentioned. I’m doing that now and will report back shortly. I wanted to ask a question and point out one thing.
For a media project like ours it is pretty standard to start the video on load…so I’d still like to know how to do it, but also interested in your reasoning for why you feel we shouldn’t. 🙂
I also wanted to point out that the slider on http://spirit-of-football.de/ is still a little clunky. For example if I press play while one of the video thumbnails are on the screen if the video doesn’t start fast enough the thumbnail does scroll to the next one and I can hear the video, but not see it. If I click back or on the dot for the video which I’m hearing I still don’t see the video. Wonder if I’m doing something wrong or if you are aware of these little glitches. Is there a better way.
At the moment to simplify things I’ve switched so the slider just has one video on it. I’d rather it look professional (without the fade-in fade out) and have more video on pages/post.
Cheers!
November 18, 2015 at 7:45 am #5836Christian WachParticipantFor a media project like ours it is pretty standard to start the video on load… so I’d still like to know how to do it, but also interested in your reasoning for why you feel we shouldn’t.
There are many arguments for and against, but I personally agree with assessments like this and this. YMMV. I haven’t looked into doing this with the CBOX slider as yet, for the reasons above 🙂
I also wanted to point out that the slider on http://spirit-of-football.de/ is still a little clunky. For example if I press play while one of the video thumbnails are on the screen if the video doesn’t start fast enough the thumbnail does scroll to the next one and I can hear the video, but not see it. If I click back or on the dot for the video which I’m hearing I still don’t see the video. Wonder if I’m doing something wrong or if you are aware of these little glitches. Is there a better way.
Thanks for the review. It’s not ideal, I agree, but it was the best I could do in the time I had to do it. PRs most welcome if you happen to have time to refine the code. I will post here if I get a chance to revisit it and improve the behaviour.
At the moment to simplify things I’ve switched so the slider just has one video on it. I’d rather it look professional (without the fade-in fade out) and have more video on pages/post.
That seems like a reasonable interim solution.
Cheers, Christian
November 18, 2015 at 7:47 am #5837Greg AcunaParticipantHi Again Christian…
First of all I want to tell you your instructions were excellent and easy to follow. I deleted the old code and then copied the new code from the link you gave me to the feature-slider setup.php file. I then uploaded the plug-in to the plug-in folder and activated it from the site dashboard. No problems at all.
Unfortunately the thumbnail and then the video while playing are fading to white every 10 seconds for 200 ms as per the settings CBox theme options.
I cleared my cache to make sure it wasn’t that, but same problem. Have I missed something. Is there something I’m supposed to do with the plug-in?
Thanks again for your help. Regards!
- This reply was modified 9 years, 1 month ago by Greg Acuna.
November 18, 2015 at 10:43 am #5841Christian WachParticipantthe video while playing are fading to white every 10 seconds for 200 ms as per the settings CBox theme options
I’ve noticed this too when there’s only a single slide.
Try putting
$args['autoStart'] = false;
on a line after$args['controls'] = true;
. If that still doesn’t stop this, add$args['auto'] = false;
as well. Hopefully this should stop the slider from auto-transitioning.EDIT: the code should go in the plugin.
- This reply was modified 9 years, 1 month ago by Christian Wach. Reason: Added link to code on Github
November 21, 2015 at 1:09 am #5846Greg AcunaParticipantChristian…once again many thanks for your time and effort. I’m so busy with other parts of the project (and not much of a web programmer) that I’m going to settle for the interim solution and hope our efforts to empower children to change the world will gather enough interest to raise the money we need to get the website build right. In the meantime I’ve taken your advice to heart and changed the video so it isn’t auto playing.
Best wishes, Greg
November 21, 2015 at 1:54 pm #5849Christian WachParticipantI’m going to settle for the interim solution and hope our efforts to empower children to change the world will gather enough interest to raise the money we need to get the website build right.
Happy to help, good luck!
-
AuthorPosts
- You must be logged in to reply to this topic.