Update RccTransmissionService .listen() and setup(); integrate with Settings
RccTransmissionService.listen(meta: unknown)
and .setup(data:unknown) need updates.
What do they do?
.setup(data:unknown)
sends the data through some of the available transmission services. At the moment it looks for the service whose constructor.name
is 'CombinedTransmissionService'. Which cannot work when the code has been uglified/minified. If that does not work (it will always fail when uglified/minified) picks the first one it comes acorss - waah! The user should be able to pick a transmission service.
.listen(meta:unknown)
looks for a transmission service that can receive data using the meta data provided by this method (we have multiple: 'WebRTC' and 'Combined' at the moment, the latter combining WebRTC and WebSockets). The user should be able to pick a transmission service.
What is do be done?
Add Settings
- Give each Transmission service in
lib/features/src/transmission
a static id, a static label (translation string) and a static description (translation string) - Add a settings entry that lets the user pick one of the available transmission services for sending. (default: Combinded)
- Add additional setting entries for each transmission service for the user to mark whether or not allows the app to receive data though that service (default for all: enabled)
.setup()
- Only use the service for sending set in settings.
.listen()
- If the matching service is permitted to receive data go ahead
- If not prompt the user
Unit tests
- Test if the user settings have the desired effect