Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
This PR implements an autoplay featured for issue #584
Autoplay is a user setting which can be checked on/off on the settings and file pages. When on, it will play videos that have downloaded at least one blob. Otherwise, it will begin the download.
This adds a new icon and some CSS.
Nice @daovist. This will be a great feature. I have a few comments
Can you rebase so only your new code is in this PR? I'm not sure what you added and what is from other commits
I definitely don't think the checkbox should be on the file page. I think only having it in settings is fine.
I see you added a new icon, but I don't see it being used anywhere.
Lastly this doesn't seem to work for me. I've tried a few different free videos, but nothing happens when I navigate to them.
This PR should be properly rebased. I now understand that force pushing to a branch is normal.
I spoke with @kauffj about the UI and this is what we came up with. I should have explained this in more detail.
There needs to be some way the user can turn control autoplay on this page. I started with a button on the layover beneath the loading message but we looked at another video site and decided we liked a toggle switch and also that that was beyond the scope of this PR. We discussed creating a toggle switch interface to replace most/all checkboxes throughout, including this one.
There is also the issue of needing some way to cancel a download--which would be called when the autoplay is turned off--but that requires changes to the daemon first.
The icon part was from when I first had this working as a button.
I just tried again and "it works on my machine". I'm not sure what could be preventing autoplay for you.
The thought process was:
I'm really not a fan of having it on this page at all, because it won't do anything. If a video has already started, and they un-check it, the video will continue to play. And if a video isn't playing and they check it, it won't start playing.
For the majority of people of who keep this setting on, it will just be an extra input on the page that they never interact with (unless by accident, and they wonder why the videos aren't playing anymore)
@daovist Ah I realized why. You have a check to not autoplay if users have
Another thing I would add is having some check inside