Git Product home page Git Product logo

listen's Introduction

Listen

An online player for your offline music and audio-books

FOSSA Status

About

This is an experimental project to build a simple web based audio player with first-class support for audio books. When complete, ths should be able to:

  • Play all audio files supported by the browser
  • Support/UI for all platforms including mobile
  • Work offline (PWA)
  • Display music metadata
    • Album art
    • Lyrics
    • Other details
  • Sort files semantically
  • Keep a log of files played with start, end times of both the file and the clock so that audio-books can be resumed from anywhere quickly even if the user had fallen asleep in the middle of the book. (This happens to me quite a lot.)
  • Save playlists (collections)
  • Basic player functions:
    • Play
    • Pause
    • Resume
    • Stop
    • Play Next File
    • Play Previous File
    • Fast Rewind
    • Fast Forward
    • Speed Control
    • Pitch Control
    • Repeat current song once/forever
    • Repeat playlist
    • Shuffle playlist (+altered by repeat option)
    • Change volume
  • Auto-scan folders to create playlists
  • Equalizer and effects

Setting-up

  1. Clone the project and switch to directory
  2. Setup pnpm globally if not already installed: npm i -g pnpm
  3. Run pnpm install
  4. Run pnpm start

Differences from a "industry standard" React project

Some of the tools and design decisions might be different from what you are familiar when working with React. These might be replaced/abandoned in the future depending on how they will match the requirements.

  1. Vite is used as the bundler which uses esbuild for compilation and rollup for bundling.
  2. Using PNPM instead of NPM/Yarn.
  3. No state management libraries such as Redux/Mobx/XState/Recoil...; RxJS is used to create a redux + redux-observable/saga like environment which is more flexible and powerful.
  4. Using TailwindCSS: trying to minimize CSS use and completely avoiding CSS-in-JS. Utility class names are used and when necessary, class names are combined to make a new selector/class name in a PostCSS file. These class names are used semantically like how interfaces are used in OOP.
  5. components are organized in a tree based on where they are used. The logic required for each component is stored with the component semantically unless they impact the global state. New components are created to avoid deep prop-drilling, to avoid tree going too deep and when new features are introduced. Logic for cross-cutting concerns are in the util folder. reducer, epics and effects handle most of the top level application logic and need refactoring. Only App has direct access to global state, so there is no presentational vs. container component separation.

License

FOSSA Status

listen's People

Contributors

fossabot avatar renovate-bot avatar renovate[bot] avatar umstek avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

listen's Issues

Reordering/removing playlist items

  • Removing root folder items -- cannot implement
  • Permanently deleting contents -- doesn't work
  • Hiding files from inner folders
  • Reorder contents

Default order should be:
(Album THEN (Track Number OR_ELSE Title)) OR_ELSE Tokenized File Name
Tokenized File Name should handle number sequences appropriately.

Save listen log

Remember the collection/path/file/position of audio files on every play start so listening can be resumed if the listener falls asleep.

Later: Timers

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @storybook/testing-library Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @types/chai to v4.3.16
  • chore(deps): update dependency @types/mocha to v10.0.7
  • chore(deps): update dependency @types/node to v18.19.39
  • chore(deps): update dependency eslint-plugin-react to v7.34.3
  • chore(deps): update dependency tailwindcss to v3.4.4
  • chore(deps): update storybook monorepo to v7.6.20 (@storybook/addon-essentials, @storybook/addon-interactions, @storybook/addon-links, @storybook/react, @storybook/react-vite, storybook)
  • fix(deps): update dependency @sinclair/typebox to v0.32.34
  • chore(deps): update dependency esbuild to v0.21.5
  • chore(deps): update react monorepo (@types/react, @types/react-dom, react, react-dom)
  • chore(deps): update dependency @types/wicg-file-system-access to v2023
  • chore(deps): update dependency chai to v5
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-config-prettier to v9
  • chore(deps): update dependency eslint-plugin-prettier to v5
  • chore(deps): update dependency postcss-import to v16
  • chore(deps): update dependency vite to v5
  • chore(deps): update github/codeql-action action to v3
  • fix(deps): update dependency @headlessui/react to v2
  • fix(deps): update dependency @mdx-js/react to v3
  • fix(deps): update dependency dexie to v4
  • fix(deps): update dependency react-icons to v5
  • fix(deps): update dependency rxdb to v15
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/codeql-analysis.yml
  • actions/checkout v3
  • github/codeql-action v2
  • github/codeql-action v2
  • github/codeql-action v2
npm
package.json
  • @headlessui/react 1.7.19
  • @mdx-js/react ^2.1.5
  • @sinclair/typebox ^0.32.0
  • @storybook/addon-docs ^6.5.14
  • dexie 3.2.7
  • dexie-react-hooks 1.1.7
  • events 3.3.0
  • luxon 3.4.4
  • music-metadata-browser 2.5.10
  • react 18.2.0
  • react-dom 18.2.0
  • react-icons 4.12.0
  • rxdb ^13.13.5
  • rxjs 7.8.1
  • @esbuild-plugins/node-globals-polyfill 0.2.3
  • @esbuild-plugins/node-modules-polyfill 0.2.2
  • @storybook/addon-essentials ^7.0.0-alpha.54
  • @storybook/addon-interactions ^7.0.0-alpha.54
  • @storybook/addon-links ^7.0.0-alpha.54
  • @storybook/addon-postcss ^2.0.0
  • @storybook/react ^7.0.0-alpha.54
  • @storybook/react-vite 7.6.17
  • @storybook/testing-library ^0.2.0
  • @testing-library/react 13.4.0
  • @types/chai 4.3.14
  • @types/events 3.0.3
  • @types/luxon 3.4.2
  • @types/mocha 10.0.6
  • @types/node 18.19.31
  • @types/react 18.2.79
  • @types/react-dom 18.2.25
  • @types/wicg-file-system-access 2020.9.8
  • @typescript-eslint/eslint-plugin ^5.45.0
  • @typescript-eslint/parser ^5.45.0
  • @vitejs/plugin-react 2.2.0
  • autoprefixer 10.4.19
  • chai 4.4.1
  • esbuild 0.20.2
  • eslint 8.57.0
  • eslint-config-prettier ^8.5.0
  • eslint-plugin-prettier 4.2.1
  • eslint-plugin-react 7.34.1
  • eslint-plugin-storybook ^0.8.0
  • postcss 8.4.38
  • postcss-import 15.1.0
  • prettier 2.8.8
  • rimraf 3.0.2
  • rollup-plugin-node-polyfills 0.2.1
  • storybook ^7.0.0-alpha.54
  • tailwindcss 3.4.3
  • typescript 4.9.5
  • vite 3.2.10
  • vite-tsconfig-paths 3.6.0
  • node >=16
  • pnpm >=7

  • Check this box to trigger a request for Renovate to run again on this repository

Read audio metadata

  • Title -- substitute for file name, sorting if no Track Number is found
  • Track Number -- determine order
  • Album -- determine order when multiple albums are present
  • Length -- determining full length of album

Core restructure/refactor for performance

It's time to improve performance. I'm undecided as to what library to use to manage state and actions.

Redux is quite straightforward, but I might have to add redux-saga et al later to the party, so the choice is doubtful.
I tried to integrate Recoil before, it's backed by Facebook but looked experimental at the time, and it probably didn't do what I wanted.
XState, MobX etc., I haven't tried. But by the looks of it, they'll not be very helpful either.
Rx can handle anything but might complicate some tasks if we are to follow the same standard for all code.
I wish if there was a library like redux saga, but without redux. Something that looks imperative but can implement everything RxJS can.

Playlist/collection persistence

  • Save the current view as a playlist in indexed db and load it back on demand.
  • Have a different view for playlists/collections apart from current list.

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.