Skip to content

Commit

Permalink
Merge PR #13 from /next
Browse files Browse the repository at this point in the history
  • Loading branch information
EhsanFox authored Feb 6, 2023
2 parents 4fb874c + 327a910 commit f777483
Show file tree
Hide file tree
Showing 60 changed files with 2,493 additions and 8,551 deletions.
33 changes: 2 additions & 31 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 📤 | Publish Package & Build Docs
name: 📤 | Publish Package

on:
push:
Expand Down Expand Up @@ -26,33 +26,4 @@ jobs:
- name: 🎉 | Publish Package
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}

deploy:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- name: 💥 | Checkout
uses: actions/checkout@v2

- name: 🚀 | Setup Node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: 📩 | Install Packages
run: npm install

- name: 🛠 | Generating
run: npm run build-docs

- name: 🔴 | Publish Docs
uses: SwiftDocOrg/github-wiki-publish-action@v1
with:
path: "docs"
env:
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
token: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,4 @@ jspm_packages/

# FuseBox cache
.fusebox/
v1/*
50 changes: 5 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
- [Platforms](#platforms)
- [Documents](#documents)
- [Examples](#examples)
- [YouTube Downloader](#youtube-downloader)
- [Discord Bot](#discord-bot)
- [Credits](#credits)

### Why music-engines?
music-engine currently Supports **4** biggest platform that we all know all-in-one package and access to the Audio buffers directly from the platform API, so we are **all-in-one** and we have **download feature**
music-engine currently Supports **3** biggest platform that we all know all-in-one package and access to the Audio buffers directly from the platform API, so we are **all-in-one** and we have **download feature**

### Installation
- Using NPM
Expand All @@ -31,55 +28,18 @@ music-engine currently Supports **4** biggest platform that we all know all-in-o

### Features
- [x] Custom Data Wrapper
- [x] No Token Required
- [x] No Token Required / Yet Optional for some drivers
- [x] Music Buffers (sometimes FFMPEG or Opus)

### Platforms
- [x] YouTube
- [x] SoundCloud
- [x] Spotify
- [x] Deezer
- [ ] Deezer
- [ ] Radio Javan (Maybe, maybe not)

### Documents
Documents are live at [/music-engines](https://ehsan.js.org/music-engines/)
Documents are down currently.

### Examples

#### YouTube Downloader
```js
const { YouTube } = require("music-engines");
const myEngine = new YouTube();

myEngine.use('https://www.youtube.com/watch?v=KQlyGYCKGGA', { format: true })
.then(resultArray => {
const track = resultArray[0];
const audioBuffer = track.stream()
audioBuffer.pipe(fs.createWritestream("music.mp3"))
})
.catch(console.error)
```

#### Discord Bot
```js
const { YouTube } = require("music-engines");
const myEngine = new YouTube();

myEngine.use('https://www.youtube.com/watch?v=KQlyGYCKGGA', { format: true })
.then(resultArray => {
const track = resultArray[0];

// Disabling chunking is recommended in Discord bots
const audioBuffer = track.stream({ filter: 'audioonly', dlChunkSize: 0 })
// Discord.js Stuff....
const connection = await voiceChannel.join();
const dipatcher = connection.play(audioBuffer)

// Enjoy the Music
})
.catch(console.error)
```
- More Examples would be added soon (PR's are welcome)

### Credits
- Thanks to [Kambiz](https://github.com/Scrip7) for all the helps on the package and Future PR's
Examples usages are available in [test directory](https://github.com/EhsanFox/music-engines/tree/main/test)
Loading

0 comments on commit f777483

Please sign in to comment.