You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update websocket notifier and add subscriptions example (#185)
## Description
Part of FCE-1827
## Changes
### Transcription example
Created an example under `examples/transcription`.
- It uses Bun as a runtime to check compatibility.
- The backend provides a single endpoint `/peers` which just returns a
peer token.
- The peer is created with subscriptions enabled.
- When a peer connects, the example opens a connection to Gemini Live
API to start transcribing.
### WS Notifier
Refactored the WS Notifier to use the builtin websocket client
implementation from node/bun/deno.
- The old version of the notifier used [this
library](https://github.com/theturtle32/WebSocket-Node). This library
[doesn't work on
Bun](theturtle32/WebSocket-Node#454) and its
maintenance is spotty.
- Events are now not mapped to JSON. I don't know why this was done in
the first place and broke type safety.
- Event handlers now accept the `ServerMessage_<MessageType>` type
instead of `ServerMessage` for better ergonomics.
> [!NOTE]
> The ws notifier change is breaking, but I don't think we should care.
Adapting to the new API is easy and there's a 90% chance noone uses the
notifier anyway.
## Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality to
not work as expected)
0 commit comments