zombieFox / nightTab

A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks with nightTab.
https://zombiefox.github.io/nightTab/
GNU General Public License v3.0
1.72k stars 250 forks source link

help: I can't put an animated background #236

Closed michoko999 closed 11 months ago

michoko999 commented 3 years ago

Hello, When I put the MP4 video link as background nothing happens I would like to know which link works to put an animated background

zombieFox commented 3 years ago

Hi, sorry you are having a problem with nightTab. Can you provide a few more details please:

michoko999 commented 3 years ago

URL: https://www.youtube.com/watch?v=Gv2ynaXDuOQ Parameter> Background> Visual> Video> URL Chrome: Version 90.0.4430.93 (Official build) (64 bits) Windows

zombieFox commented 3 years ago

Thanks for those extra details. I'm afraid youtube videos can't be used as backgrounds. That URL is the address to a youtube page. I'm afraid nightTab only supports direct links to MP4 files, eg: https://pixabay.com/videos/download/video-40581_large.mp4

Marcelx8 commented 3 years ago

Hi, I found a way that you can make this work, but it's a 'hack-around' and requires VLC. I tested it myself.

I found a forum discussion to get the direct URL from a Youtube video. Here are the steps to follow:

  1. Find a video on YouTube and copy the URL from the address bar.
  2. In VLC, head to Media > Open Network Stream.
  3. Paste the YouTube link in the box and click Play.
  4. Under Tools, click Codec Information.
  5. In the box that says Location, right-click the block of text and click Select All. Copy this text to your clipboard.
  6. Go back to your browser and paste the link in the address bar. This will open the source file directly on YouTube's servers. (This is the URL that you can paste into the nightTab video background input.)
  7. Right-click the video as it plays and select Save Video As.

Link to the actual discussion: https://webapps.stackexchange.com/questions/47465/how-to-obtain-the-direct-link-to-a-youtube-video-file

zombieFox commented 3 years ago

Great find @Marcelx8! I think you just cracked it.

I think I hit a problem with my helper function not working well with the URL when using the method you found. But I might be able to change the way the src attribute is added to the background element to make this work.

I'll see what I can do.

Dawid8plc commented 3 years ago

Alternatively, a local file server can be set up that could contain all the backgrounds, images, icons, and other stuff you would like to use, I was able to download the provided video, and put it on an IIS server. Of course, this method requires a lot of setup and it's not exactly simple, just putting it out there, though.

Marcelx8 commented 3 years ago

@zombieFox I'm glad this helped. :)

Marcelx8 commented 3 years ago

@Dawid8plc you are right. Maybe even have a local folder location selectable to read images and videos from. Almost how a gallery would display the contents of the directory. I guess this topic now extends to adding new features 😄

Dawid8plc commented 3 years ago

Being able to use files from the drive would indeed be a really useful feature, although not sure if Chrome Extensions can access folders like that.

zombieFox commented 3 years ago

This has been asked before in other posts, (I'm too lazy to dig them out right now). But the tl;dr is because nightTab does not store user data (to a database or an account) it stores bookmarks and theme settings in the browsers local storage. So the space is very limited.

The background image feature which I added allows a user to search for a local file. That is as much as an extension can do, open local files but not access whole directories. (And in retrospect allowing users to access local images for the background has caused issues with hitting the max space in local storage [along with a few other issues]. Hosting is really the safer option.)

@Dawid8plc suggestion is what I have been recommending in other posts, users who want more videos or images have to host them somewhere. Then link to individual files with URLs. But this requires end users to do some set up on something like a private GitHub repo, or Imgur.

Marcelx8 commented 3 years ago

@zombieFox Interesting, and thank you for your time to explain.

RohitHazra commented 3 years ago

I can't tell about YouTube video but I used videos from pixabay.com Follow these steps to change background video:

  1. Open any pixabay videos. Ex: https://pixabay.com/videos/tunnel-space-abstract-science-line-23411/
  2. Press F12 or Ctrl+Shift+I to open Inspect menu.
  3. Make sure you are in the Elements tab and search for this line Githubissues.
  4. Githubissues is a development platform for aggregating issues.