Commit Graph

46 Commits

Author SHA1 Message Date
Amish Shah
97c34b5b6f voice: clean up packet handling 2018-08-16 11:28:28 +01:00
Amish Shah
46fa9603c2 voice: delete receive stream immediately to prevent it being written to after end (#2678) 2018-08-07 17:34:01 +01:00
Amish Shah
08bbbe9301 voice: handle new client_connect and client_disconnect packets 2018-06-22 18:38:33 +01:00
Amish Shah
d69e906027 voice: fix voice receive after enabling suffix and lite encryption modes 2018-06-13 20:43:18 +01:00
Amish Shah
a5e8f05d01 voice: add end param to describe how a voice receive stream should end 2018-03-31 11:52:48 +01:00
Amish Shah
e263063ba6 voice: update prism and fix framesize to work for opusscript 2018-03-05 19:30:18 +00:00
Pascal
07c48a6845 fix: require discordjserror to throw meaningful errors where necessary 2018-01-22 20:23:36 +01:00
Amish Shah
8e5e1ad8fe Document Receiver 2018-01-19 23:03:01 +00:00
Amish Shah
60c5c1486b Remove dead files 2018-01-19 22:51:53 +00:00
Amish Shah
c6c9c0918a Fix PacketHandler runtime error (EventEmitter not imported) 2018-01-19 22:51:26 +00:00
Amish Shah
cb161a8a40 Implement Receiver debug events 2018-01-19 22:47:01 +00:00
Amish Shah
83140f11b7 Fix ESLint and inline the voice readable stream 2018-01-19 22:41:31 +00:00
Amish Shah
4a1b55d145 Receiver#createStream should take options 2018-01-19 22:38:10 +00:00
Amish Shah
2c1a302eea Redesign voice receiving, still needs cleaning up 2018-01-19 21:14:03 +00:00
Amish Shah
6058ea4888 Start voice receive rewrite 2018-01-19 17:45:37 +00:00
Amish Shah
ac0cc9a009 Remove useless SecretKey class 2017-10-26 14:02:44 +01:00
Amish Shah
96ce1b0945 Update libsodium-wrappers peer dep and fix support for the newest version 2017-10-22 21:59:30 +01:00
Robin B
97823bc376 Various documentation adjustments (#2001)
* docs(various): Add "at" to createdAt description

* docs(Client): Adjust to fit with guilds property

* docs(various): Adjust phrasing & fix typos

* docs(various): Clarifications

* docs(Permissions): fix numerus

* docs(DataStore): capitalize DataStore

* docs(various): Formatting changes

* docs(Presence): Expand RichPresenceAssets docs

* Add space
2017-10-07 01:56:17 +02:00
bdistin
dd085ceaee Datastore cleanup (#1892)
* Start Store cleanup

* wip store cleanup

* fix iterables initiating datastores

* handle the possibility of a datastore with no holds and no its own 'create' method

* more cleanup (instances that need more than just client/data)

* missed RoleStore extras

* not sure how eslint didn't catch that tab...

* avoid re-getting the channel we already have...

* cleanup resolvers and refactor them into DataStores

* ^

* and remove

* fix some bugs

* fix lint

* fix documentation maybe?

* formatting

* fix presences

* really fix presences this time

* bad fix was bad... let;s see how bad this one is..

* forgot to save a file

* make presence resolving take userresolveables too

* fix tabs in jsdocs

* fix bad fix from last night that caused issues, with better fix...

* oops
2017-09-08 23:06:10 +02:00
Amish Shah
99419a3670 Fix #1310 (strip RTP header extensions) 2017-09-05 19:14:54 +01:00
iCrawl
2aa2f73c74 Docs cleanup 2017-08-17 20:04:01 +02:00
Gavin Wainwright
7b44262346 Destructure certain imports (#1634) 2017-06-29 00:43:26 +01:00
Gus Caplan
63e54982f4 Errors Standardization (#1246)
* errors and stuff

* more errors

* all the errors

* fix build
2017-06-25 18:48:05 +01:00
Crawl
ac92d2cecc Improve docs a bit 2017-04-30 04:30:44 +02:00
Crawl
53eda09f72 Improve docs 2017-04-24 16:29:29 +02:00
Schuyler Cebulskie
136cab240d Add new ESLint rules 2017-03-17 01:23:39 -04:00
Programmix
7fd94c29d8 VoiceConnection rework (#1183)
* VoiceConnection rework

- improves codebase
- removes concept of pending connections
- attempts to fix memory leaks by removing EventEmitter listeners
- makes voice connections keep track of its own channel when it is moved by another user
- allows voice connections to reconnect when Discord falls back to another voice server or a region change occurs
- adds events for some of the aforementioned events

* Removed unused code

* More clean up / bugfixes

* Added typedefs to Status and VoiceStatus constants
2017-02-22 20:13:52 +00:00
Jacob
49944747ae Sodium (#1172)
* Use Native libsodium when available

* add newline

* fix typo of exports

* add to webpack ignore

* Update Secretbox.js
2017-02-06 01:24:54 -05:00
Programmix
7ed58f5f7f Added Opus stream support, added volume interface (#1102)
* Added opus stream support, added volume interface

* Remove setImmediate

* Fix weird syntax error

* Most useless commit ever

You're welcome, @PgBiel

* Fix potential memory leak with OpusScript

Emscripten has the tendency to not free resources even when the Opus engine instance has been garbage collected. Thanks to @abalabahaha for pointing this out.

* Typo

* VoiceReceiver.destroy: destroy opus encoder
2017-01-29 19:07:33 +00:00
Fiddlekins
6fae17912e Added try catch so that decode errors aren't fatal (#1146)
* Added try catch so that decode errors aren't fatal

* Tweaked the usage of the warn event and updated jsdocs

* Moved method into class for webpack scoping reasons
2017-01-29 18:59:00 +00:00
Programmix
9a6cb6477d VoiceReceiver: multiple streams fix (#1132)
* VoiceReceiver: multiple streams fix

silly hydar... you can't have one Opus engine instance for every stream

* Better creation of opus engine
2017-01-26 21:23:00 +00:00
Amish Shah
3b1264ad6d Fix Buffer deprecation stuff 2017-01-07 22:30:20 +00:00
Schuyler Cebulskie
4e693e2e39 Fix a small VoiceReceiver doc issue 2016-10-26 21:43:28 -04:00
Schuyler Cebulskie
d1e9d15a1c Clean up a bunch of new voice stuff 2016-10-25 20:26:57 -04:00
Amish Shah
f77af72d71 Add voice receiving again \o/ 2016-10-25 19:41:54 +01:00
Amish Shah
ea55b0efbd Fix receiver.recreate() 2016-09-12 17:43:45 +01:00
Amish Shah
95369b0a89 Add VoiceReceiver.destroy()/recreate(), addresses #693 2016-09-12 17:01:15 +01:00
Schuyler Cebulskie
47d71d32f3 Make grammer gooder 2016-09-11 01:40:37 -04:00
Schuyler Cebulskie
0b908f5bce Cleanup Part 2: Electric Boogaloo (Reloaded) (#594)
* Cleanup Part 2: Electric Boogaloo (Reloaded)

* Moar cleanup

* Tweak NOT_A_PERMISSION error
2016-09-04 10:08:09 +01:00
Amish Shah
efd1d0c738 rewrite some docs and refactor some names 2016-09-03 23:06:58 +01:00
Schuyler Cebulskie
68acf37fd4 Add stricter/better ESLint config (#589)
* Add stricter/better ESLint config

* Remove more unnecessary @returns
2016-09-03 20:45:23 +01:00
Schuyler Cebulskie
27652b94af Make JSDocs follow general conventions (#582)
* Make JSDocs follow usual conventions

* Fix StringResolvable name

* Make function lowercase
2016-09-03 09:57:25 +01:00
Amish Shah
a959cd339c Fix inaccuracy in VoiceReceiver docs 2016-08-27 23:15:21 +01:00
Amish Shah
6ddc7a813c Add VoiceReceiver streams 2016-08-26 17:34:28 +01:00
Amish Shah
48762c642c Make voice receiving better 2016-08-25 23:12:03 +01:00
Amish Shah
2d6068010b Create basic voice receiving 2016-08-25 22:40:22 +01:00