Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is a javascript library for interfacing with Youtube's API directly. It can also run on browsers. Using this, it's pretty easy to create a simple extension that replaces the default video player with your own. You can do a lot to improve your experience this way. I've made one which allows for higher quality streaming, pre-buffering video in the background, more subtitling options, etc... [2] [3].

[1] https://github.com/LuanRT/YouTube.js

[2] https://github.com/Andrews54757/FastStream

[3] Chrome (also available for Firefox): https://chromewebstore.google.com/u/1/detail/faststream-vide...



Wow, faststream works great for normal web players. Doesn't seem to work on any youtube videos when using the ff extension in the store though. Gets stuck loading forever.

Edit: fixed, works well in every test case


Seems like it is a Youtube.js problem. will investigate, doesn't happen on Chrome.

EDIT: It seems like Firefox has some special unsafe eval rule breaking dash.js

EDIT2: Problem was actually FF's sendMessage not toString()'ing URL objects. I've fixed it in V1.2.1 for FF (approval by mozilla pending)

EDIT3: V1.2.1 (Firefox hotfix) is available now

https://addons.mozilla.org/en-US/firefox/addon/faststream/


Kind of unrelated, but how difficult do you think it would be to hack support for glsl shaders in a browser? I tried to look into it once, but got a bit lost in the media source side of things. My idea was to try to add glsl shaders as post processing to video streams like in mpv but without having to jump through all the hurdles of passing data to mpv.

Example of a shader I was playing with https://github.com/TianZerL/ACNetGLSL


Isn't GLSL already supported by WebGL?


Yeah all the pieces are already there, but I was trying to make something like a player replacer that would let the user load arbitrary glsl shaders to use. The idea being to provide usable upscaling or filters for weak connections or old videos, correct shaky videos, etc. in real time.

I just found this for fsr [0] which might work for the upscaling use case.

[0] https://github.com/Hajime-san/web-fsr/tree/main/browser-exte...


Do you happen to know how well (or at all) the library supports subs/sub notifications and if people have built alternative UIs around that? The default youtube UI for that is a tremendous clunkfest.


This is nifty! It might be interesting to interface it with Sponsorblock in the future.


Hey you should post about this on our extension devs server , people would be super interested https://discord.gg/mHPkCCBx


I'll check out the Discord server because I want to see cool stuff other people are making, but I have no intention of seriously marketing my extension. I don't really want it to "take off" and become popular.

To me, FastStream is just a fun hobby project, not a product. I intend to always keep it free without unnecessary bloat or spyware of any kind. So, I don't really have a desire for it to be "successful" beyond it being immediately useful to me and a couple of my friends.


That’s totally cool I appreciate your intentions with the extension :) people have built some really cool things with extensions




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: