Giter Site home page Giter Site logo

n-ce / ytify Goto Github PK

View Code? Open in Web Editor NEW
131.0 6.0 47.0 12.07 MB

Opus Audio Streaming Web App for YouTube. Stop watching, Listen & Save Data.

Home Page: https://ytify.netlify.app

License: GNU General Public License v3.0

HTML 9.86% CSS 19.42% TypeScript 70.72%
youtube ytmusic music-player streaming spotify youtube-player audio opus music good-first-issue

ytify's Introduction

Netlify Status Tokei Lines Of Code Telegram Members Matrix

ytify is a simple WebApp, built with vanilla TypeScript for maximum efficiency, that streams only audio from YouTube. Listen to Podcasts, Audiobooks, Music, Livestreams and other Audio focused YouTube Videos, even under the lowest network conditions.

As covered in https://blog.csdn.net/gitblog_00024/article/details/139895018

What else are you getting ?

  • Queue ๐Ÿšฆ:
    • Add multiple streams to keep your audio streams going.
    • You can share your queue with anyone just by sharing the url.
    • Auto-Queue : automatically enqueues relevant streams.
  • Playlists ๐ŸŽถ:
    • View YouTube playlists , queue them to the player. You can also both subscribe and import it into your own collection
    • ytify Collections : create your own playlists disconnected from YouTube, share it with the world with share link.
  • Theming ๐ŸŽจ:
    • Modern Autonomous themed UI based on stream thumbnail.
    • High Contrast Mode for increased legibility.
  • PWA ๐Ÿ“ฑ: Install as an app on your device which also allows you to play YouTube links with it from your OS share menu.
  • Radio ๐Ÿ“ป: Fetches similar streams and creates a playlist for your stream, great for music listeners.
  • Library ๐Ÿ“š: Discover feed, history, favorites, Channels, YouTube playlists, custom playlists (collections) & Subscription Feed!

ytify_7.0_landscape

WHY / The story of ytify with n-ce

  • I was an avid NewPipe user back in 2021, which I used for background playback.
  • I noticed it wasn't able to stream under low network conditions.
  • So i decided to create an issue.
  • Upon finding no active resolution on the issue, I took it to myself and created this project on Jan 2022.

Usage ๐Ÿ‘†

https://ytify.netlify.app is the only official location that the main branch is directly connected to.

Privacy Policy ๐Ÿ‘๏ธ

We use Beampipe Analytics for minimal site stats, only the browser user-agent data is collected anonymously for this. Everything else remains on your device only, which can also be cleared anytime.(Library>Clean, Settings>Restore Settings,Clear Caches). Why collect data? I do not possess a multitude of devices, the analytics help me figure out which devices are suffering from incompatibility or if a failed update has been made or if some API instance has stopped working.

License ๐Ÿ“

Read More.

Contributing ๐Ÿ“‹

This project is actively seeking contributors, Read More Here.

Development ๐Ÿ”ง

  1. Prerequisites : Node.js , Beginner TypeScript Knowledge.
  2. Clone repository with
git clone https://github.com/n-ce/ytify --depth 1

or

 gh repo clone n-ce/ytify -- --depth 1
  1. Move to Directory, Update & Install Dependencies
cd ytify ; npm run update; npm i
  1. If you prefer using DevTools, you may disable eruda in vite.config.ts injectEruda(false),

  2. Start the development server and open localhost

npm run dev -- --open
  1. Learn More at our wiki.

Acknowledgements ๐Ÿ™

  • Piped - YouTube Data API & Adaptive Streaming Proxy
  • Invidious - YouTube Data API & Progressive Streaming Proxy
  • Cobalt - YouTube Download API
  • wsrv - Image Proxy Provider
  • Solid - Delightful JSX Library
  • HLS.js - HLS Support Library
  • Netlify - Hosting, PR Previews, User Feedback Forms, Edge Functions
  • Vite - Development Server, Code Bundling, Project Scaffolding.
  • Autoprefixer - CSS Prefixes Solution.
  • Remix Icons - Efficient Icon Solution.
  • Google Fonts - NotoSans Font.

ytify's People

Contributors

alexvcs avatar anandmathi avatar bishwassagar avatar divyansh1315 avatar evancthome avatar julietugo avatar kysonndelacerna avatar n-ce avatar nurlankz avatar reesequinn avatar samearth79 avatar sudofinn avatar tyrritt avatar udara98 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ytify's Issues

Migrate to inbuilt extractor using youtube dl exec

Current extractor is an outsourced URL.
Reason for change : takes longer time processing, not all links work.
Create a new extractor using npm module YouTube DL exec which will provide the file to be played to the audio source.

Line on Focus :

audio.src = `https://projectlounge.pw/ytdl/download?url=https://youtu.be/${x}&format=${c}`;

Where x is the video id & c is the codec value such as 249, 251.

PR to the "node" branch.

Create own theming system

Removing dark mode but integrating a new theming system that involves theming both background & elements on the page.

When background color will be chosen as black it will suffice for a dark mode.

Improve Readme

Aim : To be clean, professional & including all that which ytify is capable of.
Also have a Thanks To section consisting of :

  • YouTube.com - Hosting Content.
  • Spck.io - Coding Platform.
  • YouTubeDL - Extractor.
  • Projectlounge.pw/ytdl - Links Provider.
  • Spectre.CSS - Design Framework.
  • Netlify.com - Hosting Site.

Identify & report bugs

Report bugs by creating new issues, this is to ensure the stability of the upcoming v3 release.

404 page

A custom 404 page would look great as the default one does not really fit the colorscheme of the website.

The custom one...

  • ...looks boring and does not match the colorscheme
  • ...has no icon

A custom 404 page...

  • ...could match the colorscheme
  • ..could have an icon

Overhaul Readme

Complete rewrite is needed here along with newer screenshots.
Professional, marketing based dialogues are to be avoided as this is a very freestyle project.

switch to m4a when low bitrate opus unavailable

Observation : Newly uploaded streams do not have many bitrates to choose from. By default (low settings) ytify chooses the lowest bitrate opus stream, which in these cases would be a ~128kbps stream, which isn't so low.

Requirement : Switch to lowest available m4a bitrate, usually a ~48kbps streams, when this is the case and update the bitrate selector to only show that bitrate.

Note : when quality is set to high this switching wouldn't be required.

Add queuing support

To be able to queue links as many possible
Which will play serially one by one.
Custom clicking on a queue might be approached later.

Improve HTML

Make changes to the html code to make it more readable and standard with proper commentary.

Firefox support

For Firefox users clipboard API does not work to which an alternative must be provided.
For the moment, we would like to use an input box to paste link manually.

Pseudocode: onsubmit = script();

Create an input field

Pseudocode:
if navigator copytext not available input display = block; Else display = none (default);
Continuation of #10

Add player controls

  • Add Play/Pause button
  • Add 10 second Rewind button
  • Add 10 second Forward button

Improving Desktop View

download (2)
Screenshot from pagespeed.web.dev

Since i do not have a desktop computer i have not been able to successfully render a proper view on the desktop despite my several attempts, it always looks underfunctioning.
It is my request to interested developers who want to work on this to improve the web app experience on desktop.

What requires changing?

  • The player container width should be equal to the data container.
  • The text on the data container should be large enough to fill it. Currently there is this white unused space which makes it look worse.
  • button labels should be readable.
  • and or anything the assigned developer thinks should change.

add audio stream duration to the player

e.g - 0:00 ------------ 2:49
e.g - 0:30 ------------ 2:49
There is not any information being showed in the player about the stream

  • full duration
  • current duration

Redesign & Rewrite

This site has to go under redevelopment after a long hiatus.

We will

  • start by having a skeleton UI ready,
  • proceed with incorporating new functions (eg. Format 600, following semantic versioning),
    • HTML
    • CSS
    • JS
  • finish with focusing on fixing bugs.
  • Documentation

Add a custom html audio player

Replace the default html audio player with a simple custom player which can support the user interface of the overall site.

Doesn't work on few youtube videos

Hello, I liked the product being built and tested a few things, but when I tested with few links from a particular channel. the video doesnt seem to load. Tried clearing cache/cookies and tested again.

What was Tried ?
The video doesn't seem to load when the video link was copied to clipboard and when I switched to ytify website.

What were the links used ?
https://www.youtube.com/watch?v=8tR8LAsjJHY&ab_channel=SETIndia
https://www.youtube.com/watch?v=cn7mk9M9-pU&ab_channel=SETIndia
And any video from SETIndia Channel

Improve the styling [CSS]

Improve the styles of the site to make it look better and responsive on all range of devices. Fonts, Color scheme changes are also allowed.

Add Loop Checkbox

Add a checkbox button for loop
If checked
Audio onended = restart playback

Organize CSS

Arrange the CSS in an efficient manner with proper commenting.

Update readme & add instructions

Since we are moving the about section from the website to this github repo, have an usage section displaying how to use instructions and per button function.

Modularize the JS CodeBase

Since the codebase is huge its becoming increasing difficult to maintain and develop. To solve this we separate the script.js file into various modules as per functions using JS modules import export.

dynamically updating open graph tags for social media previews

Relevant Links

Update Strategy

  • Reference relevant og tags in lib/DOM.
  • Updating them in setMetadata() =>
    const setMetadata = (thumbnail, id, streamName, authorName, authorUrl) => {
    img.dataset.src ?
    img.dataset.src = thumbnail :
    img.src = thumbnail;
    title.href = `https://youtube.com/watch?v=${id}`;
    title.textContent = streamName;
    author.href = `https://youtube.com${authorUrl}`;
    author.textContent = authorName;
    document.title = streamName + ' - ytify';
    if ('mediaSession' in navigator)
    navigator.mediaSession.metadata = new MediaMetadata({
    title: streamName,
    artist: authorName,
    artwork: [
    { src: thumbnail, sizes: '96x96' },
    { src: thumbnail, sizes: '128x128' },
    { src: thumbnail, sizes: '192x192' },
    { src: thumbnail, sizes: '256x256' },
    { src: thumbnail, sizes: '384x384' },
    { src: thumbnail, sizes: '512x512' },
    ]
    });
    }

Development List

  • Future
    • PlayPrevious button (requires storing streamHistory)
    • Favorites button (saves favorites to localStorage as map)
    • Recommendations feed using indexedDB & related streams averages of favorites
    • Material You colors with material color utilities
    • rewrite cleaner / efficient CSS
    • Github Actions
      • Vite : compile js modules and css into one and minify it
      • Autoprefixer : removes need for manually adding css prefix

View older versions here only for reference : v1 || v2 || v3 || v4 || v5

Changelog

v5.14:

  • Tabbed Navigation

v5.13:

  • Autoplay
  • QueueListUI

v5.12 :

  • search suggestions

v5.11 :

  • search filters
  • subtitle selector
  • settingsMenu instead of list

v5.10 :

  • Search

v5.9 :

  • Subtitles
  • Related Streams

v5.8 :

  • Settings inside Player container
  • all DOM references with getElementByID (why?)
  • avif images => webp to extend browsers support as well as less computationally expensive
  • incorporated luuvdk's colorjs' image data processing algorithm directly into themer()
  • replaced local storage with html data attributes for data binding
  • new found optimizations and fixes which were previously unseen

v5.7 :

  • Share youtube link into ytify PWA
  • m4a fallback when opus unavailable
  • feedback button
  • substantial performance gains

v5.6 : Seek Backward && Forward buttons

v5.5 :

  • icons with labels below
  • bitrate select menu

v5.4 :

  • Using Remix Iconset for quicker site load
  • Removed Color.js dependency which was slowing down site with blazing fast 6 line code

v5.3 :

  • query enhancement : playlist query && time query
  • piped fetch error reporting
  • dont depend on a single piped instance

v5.2 : replace personal backend with piped api

v5.1 : current and full duration info

v5 :

  • Newer and simpler UI
  • A new theming engine
  • Code Efficiency Increased
  • Memory Consumption Decreased
  • personal backend api
  • 200+ lines of code removed
  • code maintainence made easier

v4 :

  • remove spectre css dependency
  • code modulariztion
  • color accents extraction from thumbnail for theming
  • separate gradient themes
  • functional ui design

v3 :

  • current track title
  • better thumbnail source
  • thumbnail setting
  • queue badge
  • standardiztion
  • optimization
  • code reduction

v2 :

  • removed howler.js depenency
  • audio controls
  • save settings support
  • dark mode
  • 128kbps hq button
  • pwa support

v1 :

  • input field to take url
  • using howler js to handle audio
  • using clipboard api to take url

Laggy Buffering

Observation

  • Takes 10secs to forever to load stream src.
  • while playing stops, takes another gap of time to load next part of the stream, resumes, this continues for the entire playback.

Expectation

  • Takes 0-2 seconds to load stream src.
  • Plays smoothly without any buffering gaps.

Points

  • Happening since a week or more
  • Changing Browsers does not solve.
  • Changing IP does not solve.
  • Changing ytify instance does not solve.
  • Changing piped instance does not solve.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.