Commit Graph

25 Commits

Author SHA1 Message Date
bitfl0wer 2cc0a75540
Prefer &str over String where possible. 2024-08-26 12:36:01 +02:00
kozabrada123 832576dbf4 Update documentation in gateway_observers example 2024-07-25 11:28:22 +02:00
bitfl0wer 7554f90187
Replace `Observer` and `GatewayEvent` with `pubserve` crate 2024-07-13 14:28:22 +02:00
kozabrada123 89333d6353
Implement gateway options, zlib-stream compression (#508)
* feat: add GatewayOptions

* feat: implement zlib-stream compression

This also changes how gateway messages work.
Now each gateway backend converts its message into an
intermediary RawGatewayMessage, from which we inflate
and parse GatewayMessages.

Thanks to ByteAlex and their zlib-stream-rs crate, which
helped me understand how to parse a compressed websocket stream
2024-06-23 17:23:13 +02:00
kozabrada123 74d6785e50 Primitive voice implementation (feature/voice) (#457)
* Add Webrtc Identify & Ready

* Add more webrtc typings

* Attempt an untested voice gateway implementation

* fmt

* Merge with main

* Same allow as for voice as normal gateway

* Test error observer

* Minor updates

* More derives

* Even more derives

* Small types update

* e

* Minor doc fixes

* Modernise voice gateway

* Add default impl for voicegatewayerror

* Make voice event fields pub

* Event updates via the scientific method

* ??

* Fix bad request in voice gateway init

* Voice gateway updates

* Fix error failing to 'deserialize' properly

* Update voice identify

* Clarify FIXME related to #430

* Update to v7

* Create seperate voice_gateway.rs and voice_udp.rs

* Restructure voice to new module

* fix: deserialization error in speaking bitflags

* feat: kinda janky ip discovery impl

* feat: return ip discovery data + minor update

* feat: packet parsing!

* fix: voice works again

* feat: add voice_media_sink_wants

(comitting uncommited changes to merge)

* chore: rename events/webrtc to events/voice_gateway

* Add UdpHandle

* chore: clippy + other misc updates

* fix: attempt to fix failing wasm build

* chore: yes clippy, that is indeed an unneeded return statement

* feat: add VoiceData struct

* feat: add VoiceData reference to UdpHandler

* feat: decryption?

* chore: formatting

* feat: add ssrc definition (op 12)

* feat: add untested sending & asbtract nonce generation

* feat: Public api! (sorta)

* small updates

* feat: add sequence number

* chore: yes

* feat: merge VoiceHandler into official development

* chore: yes clippy, you are special

* fix: duplicated gateway events

* feat: first try at vgw wasm compat

* fix: blunder

* fix: gateway connect using wrong url

* fix: properly using encrypted data, bad practice for buffer creation

* chore: split voice udp

* feat: udp error handling, create udp/backends

* fix: its the same

* chore: clarify UDP on WASM

* api: split voice gateway and udp features, test for voice gateway in WASM

* feat: new encryption modes, minor code quality

* docs: document voice encryption modes

* chore: unused imports

* chore: update getrandom version to match wasm version

* chore: update on packet size FIXME

* drop buf asap

* Okay can't do that actually

* tests: add nonce test

* normal tests work?

* docs: fix doc warning, fix incorrect refrences to 'webrtc'

* chore: json isn't a doc test

* tests: better gateway auth test

* testing tests

* update voice heartbeat, fix the new test issue

* committed too much

* fix: unused import

* fix: use ip discovery address as string, not as Vec<u8>

* chore: less obnoxious logging

* chore: better unimplemented voice modes handling

* chore: remove unused variable

* chore: use matches macro

* add voice examples, make gateway ones clearer

* rename voice example

* chore: remove unused VoiceHandler

* fix: implement gateway Reconnect and InvalidSession

* Typo

Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>

* Fix a bunch of typos

Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>

* fix: error handling while loading native certs

* fix: guh

* use be for nonce bytes

* fix: refactor gw and vgw closures

* remove outdated docs

---------

Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>
2024-04-16 17:18:21 +02:00
bitfl0wer b8ba92cf07 Include license header everywhere 2024-01-30 17:19:34 +01:00
kozabrada123 1f5a6e5266 feat: switch safina_timer for tokio, fix sleep duration overflow in examples 2024-01-19 15:48:59 +01:00
kozabrada123 796bea7492 right 2024-01-19 15:31:40 +01:00
kozabrada123 85602de91c fix tests 2024-01-19 15:14:50 +01:00
Flori 06f3046134 initial wasm32 'support' (#443)
* Give tungstenite types distinct names

* reorganize files

* Better feature locking, add wasm.rs

* Implement wasm Backend

* add wasm-bindgen-test

* Build & Test for wasm

* Add macos safari wasm test

* Add wasm32 target

* Add wasm.rs test

* Move wasm-pack installation before test execution

* Fix build on wasm32

* Fix examples depending on tokio::time

* fix clippy warn

* Add example wasm bindgen test

* Add wasm-bindgen to Cargo.toml

* Add wasm test configuration

* Install wasm-bindgen-cli on linux

* Add  wasm-bindgen-cli to macos

* Correct "vers" to "version"

* Attempt to locate correct geckodriver

* Run wasm tests first

* maybe this will fix ci :clueless:

* Move wasm-bindgen-cli install

* Add cargo-binstall installation script for
wasm-bindgen-cli

* Try using only one browser

* remove geckodriver

* Move all wasm related tests to macos

* Rename macOS test step for clarity

* Try out combined coverage report

* try different strategy to skip coverage on forks

* Revert "try different strategy to skip coverage on forks"

This reverts commit fb46ab83ac.

* Revert "Try out combined coverage report"

This reverts commit d34a813d8a.
2023-11-20 13:40:55 +01:00
bitfl0wer a4d5ebb689 Resolve merge conflicts 2023-11-19 19:12:29 +01:00
bitfl0wer 862a846055 Rename `get_handle` to `spawn` 2023-11-18 19:07:56 +01:00
bitfl0wer 9507d489bf Import trait 2023-11-18 18:41:11 +01:00
bitfl0wer 16bdd68d98 Fixed most errors, simplified new generic traits 2023-11-18 18:39:01 +01:00
bitfl0wer b93b3690da Refactor project to use chorus::Gateway[...] 2023-11-15 21:03:53 +01:00
bitfl0wer e4cc201b79 Remove all imports of Gateway and GatewayHandle 2023-11-15 20:57:06 +01:00
bitfl0wer 20c9066e6f Properly extract all extractable methods from GatewayHandle into Trait 2023-11-15 20:18:50 +01:00
bitfl0wer 5af6d1ce4b Refactor Gateway module to implement traits and
improve code structure
2023-11-15 18:44:19 +01:00
bitfl0wer 110ce51c05 + ws_stream_wasm, - dev-dependency on tokio/full 2023-11-13 12:43:00 +01:00
Zert3x 0d6d705e46 Async Observer Trait (#147) 2023-07-11 19:20:27 +02:00
Vincent Junge 1df01512d7 simplify GatewayEvent 2023-06-20 16:12:13 +02:00
Vincent Junge 208eeac536 Fix various Clippy lints 2023-06-19 12:35:07 +02:00
kozabrada123 78e63657c8 Change observer update ref to &mut from & 2023-06-10 15:37:02 +02:00
kozabrada123 cd52c5ac3a Cargo fix 2023-06-09 18:11:01 +02:00
kozabrada123 d9b1c382b7 Add simple gateway examples 2023-05-28 17:41:50 +02:00