discordjs / voice

Implementation of the Discord Voice API for discord.js and other JS/TS libraries
Apache License 2.0
327 stars 111 forks source link

FFMPEG In-built Support #161

Closed iim-ayush closed 3 years ago

iim-ayush commented 3 years ago

Please describe the changes this PR makes and why it should be merged:

Added in-built support for FFMPEG without disturbing createAudioResource function.

Created a whole new function in audio - resource file. [ createFFMPEGResource() ]

Status and versioning classification:

Resolves #143 , #117 , #141 , #124.

codecov[bot] commented 3 years ago

Codecov Report

Merging #161 (3ced618) into main (f1869a9) will decrease coverage by 0.16%. The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #161      +/-   ##
==========================================
- Coverage   73.84%   73.67%   -0.17%     
==========================================
  Files          21       21              
  Lines         906      927      +21     
  Branches      221      229       +8     
==========================================
+ Hits          669      683      +14     
- Misses        235      242       +7     
  Partials        2        2              
Impacted Files Coverage Δ
src/audio/AudioResource.ts 88.88% <66.66%> (-7.78%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f1869a9...3ced618. Read the comment docs.

iim-ayush commented 3 years ago

🤔 imo options like reconnect, reconnect_time, seek should be handled by the users since this api provides arguments option? Users should have full control over this 😕

I know about this.

Options like reconnect, reconnect_time, seek are for those users who particularly don't know much about setting up FFMPEG args.

It will be easier for people who have just shifted from discord voice old module to find seek option. Moreover, FFMPEG has some issues with connection drops. So I added reconnect args only to help to fix that issue.

arguments allow users to have full control what they need to pass and what not to pass. [ without options like reconnect, reconnect_time, seek ]

iim-ayush commented 3 years ago

Thanks, I got my reply for re-review.

iim-ayush commented 3 years ago

Let's see how much time will it take to merge

LingleDev commented 3 years ago

can you merge this? it would be very helpful

iim-ayush commented 3 years ago

can you merge this? it would be very helpful

I am going to make another pull request soon. So wait till then.