Resource icon

OBS Lua Youtube Auto-Loader 1.0

iwatchgamessometimes submitted a new resource:

Youtube Auto-Loader - Automatically loads and starts youtube links from your Windows clipboard in a browser source!

This script will connect to an existing browser source and use it to play back minimalist embedded versions of youtube clips. It will rewrite the URL and the CSS of the source each time it detects a youtube link from the Windows clipboard. The CSS edits are to make sure that the source is completely transparent once playback is finished, but they are set in a variable at the top of the script if you want to alter them.

This supports links in both youtube.com and youtu.be forms. It may not...

Read more about this resource...
 

ChumtheWaters

New Member
This is an awesome tool - wondering if it's possible to pause the video playback. Tried using interact with no success. Maybe you could create a Keybind that we can map?
 

sandmanjp

New Member
It seems it auto starts if you copy a new link, even if the source is not visible.
Can you fix so that it does not auto start if the source is not visible?

Anyway to add a manual start stop button would be great.
 
Last edited:
I just now realized there was an automatically generated thread for discussion. I was only looking at the reviews for feedback, and now I feel awful about that.
Add the ability to read a link from a file.
That shouldn't be difficult at all to do.

This is an awesome tool - wondering if it's possible to pause the video playback. Tried using interact with no success. Maybe you could create a Keybind that we can map?
Interact works for me to pause and restart .
Interact comes solely from the browser source, which is not part of my script. I can look into the possibility of a keybind, but I would basically be mapping a key to interact with an external source, which may or may not be possible

It seems it auto starts if you copy a new link, even if the source is not visible.
Can you fix so that it does not auto start if the source is not visible?

Anyway to add a manual start stop button would be great.
I actually noticed that issue myself. It is easy enough to disable the autoplay via altering the code
Code:
"?autoplay=1&controls=0&fs=0&iv_load_policy=3&modestbranding=1\z
so that autoplay=0 so that it does not start the instant its copied to the clipboard. I should probably add a config option for that. As stated before, however, the script is not responsible for interactions within the browser source, so manually playing and pausing without using the Interact function of the browser source may not be possible.

EDIT: On reading this last part again, I realize its possible to simply not load the url into the browser source if the browser source is not visible, which would prevent autoplay from being an issue, but I would need to think on how best to "store" that value from the clipboard and watch for the browser source to become visible. If not handled well it could end up turning into a mess when more links get copied.
 
Last edited:
Top