How to stream a YouTube video as audio – Introducing Liseen
I completely enjoys YouTube actually, and I’m not very disciplined when I’m in. This is one thing that I actually wish to decrease.
In the hunt of an answer, I assumed it will be cool if I might take heed to a few of my favourite creators whose visuals doesn’t add a lot to the worth I’m getting from their movies whereas I’m working, like Ali Abdaal, non secular lectures, historical past vids and my favourite nasheeds and so forth.
That’s how Liseen got here to reside, it a extremely cool answer and a small effort to repair your focus, whereas having fun with your favourite content material that’s solely accessible on YouTube.
I put fairly an effort to make it extra enjoyable to make use of, with a extremely clear UI and delicate animation touches.
If you are curious to how I used to be in a position to pull audio out of a YouTube movies, then learn additional! Otherwise, begin listening already 🎧. liseen
How it really works.
When I used to be tinkering the best way it will work Initially, I assumed I’d fetch the uncooked video stream, do some magic and extract the audio from the stream. Sounds actually difficult, however I used to be prepared to drag it off. Until I encountered my oversight, YouTube doesn’t offer you direct entry to a video steam, and similar to that, t that total plan met it finish.
But, in some way I nonetheless must make it work, Then one other answer hit my mind, which spoiler alert ⚠, it labored and that’s how the content material is presently being performed on Liseen.
I used Iframe embedding as a substitute, however make the scale Non existence, that’s, 0 width and peak. This answer whereas may appear like rip-off, it really get the job completed, whereas additionally delivering on one of many guarantees I.e low information consumption, as most playback are set to probably the most minimal high quality the place audio high quality just isn’t sacrificed.
This successfully concludes how Liseen performs a YouTube video as audio for different strategies of fetching video data (title, description and thumbnail ) the YouTube API is used for this goal.
Playing in background.
This one could be very difficult to make, and actually, I’ve no management over whether or not or not, the content material enjoying will hold within the background. The approach I’ve carried out it’s to play the content material each time it’s paused as a consequence of sleep or the window is minimized.
This technique comes with some uncomfortable side effects and options like “kill background apps consuming energy” on cellular gadgets may make this unreliable, “however to date In my assessments I by no means bumped into such downside".
Liseen can be put in as a PWA, which makes accessing it loads simpler.
Your ideas?
Super had enjoyable constructing this, particularly that I’ve to hack loads issues to make it work. I’ve been utilizing it ever since, it has helped me loads in avoiding getting distracted by YouTube, after I’m working.
Love to know what you suppose, is it cool 😎 or simply meh. BTW when you’ve got a greater method to implement, I’m prepared to take heed to you 😉.
Stay tremendous superior 😊.
HI-FI News
through DEV Community https://dev.to
April 25, 2024 at 11:02AM
-
Product on sale
Audiophile Vinyl Records Cleaning BundleOriginal price was: €69.90.€59.90Current price is: €59.90. incl. VAT -
Product on sale
Easy Start Vinyl Records Cleaning KitOriginal price was: €69.90.€59.90Current price is: €59.90. incl. VAT -
Vinyl Records Cleaner Easy Groove Concentrate€34.95 incl. VAT -
Easy Groove Super Set€199.00 incl. VAT -
Easy Groove Enzycaster – vinyl records prewash cleaner€34.95 incl. VAT -
Easy Groove Extreme MK. II- vinyl records prewash cleaner€45.00 incl. VAT -
Vinyl Records Cleaner – Easy Groove Virgin Concentrate€35.00 incl. VAT -
Easy Groove Spray&Wipe vinyl records cleaner€34.95 incl. VAT








