The backend was not properly exiting in case of early exception (e.g. configuration
error). It seems to be related to the use of the `@aio` decorator, but couldn't find the
exact issue with loop. The use of `os._exit` is a workaround for now, until the fix is
inspected more deeply and properly fixed.
Libervia Media is now a Python package instead of files to put in a directory to specify
in settings. The discovery is now automatic, removing the need for settings and enabling
easier installation. Furthermore, it should now work even if the package is zipped.
`libervia_media` can now be specified as a dependency for frontends requiring it.
- Restore plugin_misc_static_blog and rename it to plugin_misc_render_blog_params as it is
still in use in web frontend.
- Only the `Background` param is actually used, all other params have been removed.
Singular form is chosen as it makes more sense when configuring settings in TOML:
```TOML
[plugin.some_plugin_name]
option=value
[component.some_component]
option=value
```
- Add `autodoc_pydantic` dependency for `docs`, it renders nicely Pydantic models,
including the settings.
- Add documentation for `li info tor`
- Add a dedicated section on Tor
fix 473
`tor` sub-command shows info on currently running Tor daemon (if any), and on the circuit
used to connect to XMPP server with current profile (if relevant).
rel 473
As Pydantic becomes more and more used in Libervia, it is now important to have a
dedicated output in the CLI.
This patch also fixes `json` and `json_raw` outputs which were incorrectly calling
`console.print_json`.
rel 473
- Add the `txtorcon` optional dependency, used with `tor` extra.
- Add settings for Tor.
- Use Tor endpoint when an `.onion` XMPP domain is used, of when Tor is explicitely
enabled in conf.
- Disable WebRTC, for now it's the safer option as WebRTC can leak IP. It should be
possible to use it over Tor by forcing the use of a .onion relay, but this is to be
explored later (A/V should be to slow to be usable, but that stay relevant for file
transfer or other WebRTC powered things).
- A new `treq` instance using Tor WebAgent is used when Tor is enabled. Properties has
been added to SatXMPPEntity to conveniently get the right instance.
- Another `tor_mode` property has been added with corresponding bridge methods, to see if
Tor is activated and in which mode for a given profile. For now there are only two modes
(disabled, and enabled with WebRTC disabled), but in the future it may be possible to
activate WebRTC over Tor, or to use Tor only to connect to XMPP server, while using
clearnet for other connections.
- Tor dedicated models have been added, and bridge methods have been added to build and
get them.
- Fix tests.
rel 473
This is a huge configuration refactoring.
The configuration system now uses Pydantic settings, with better validation, better
support for environment variables and other goodies.
The main config files now use TOML instead of INI, this allow for better handling of
complex types, notably dict.
Plugins, components and frontends can declare their config settings in a class which will
be imported dynamically.
`no_ui` output is used when a local UI must not be created, e.g.; because the stream is
piped out. The `--no-ui` option has been removed because using a dedicated output seems
like a better approach.
A new `record_fd` argument can now be used to specify a file descriptor. If set, the
incoming stream will be written there.
For now `record_fd` must be specified on `WebRTC` creation. In the future, it should
be possible to add or remove it it during a call.
Update the pipeline workflow to handle `SourcesStdin`. A `decodebin` is used to autodetect
the stream type, then audio and/or video elements are created and plugged accordingly.
When packets are lost, artefacts appear and the remove stream video quickly becomes mush
(can be reproduced by blocking UDP for few seconds). To recover from this situation, the
video pad is monitored for GAP events, and when they occur, a new keyframe is requested 1s
after the last GAP.
- Each video source (webcam, desktop, muted) has now a specific config, to adapt
framerate, bitrate and keyframe max distance.
- Improve logging.
- Tuned pipeline to make it error resilient and improve bitrate.
`app.sendPostedEvents` was not handling all events (notably not the window system ones),
resulting in side effects such as the image freezing during A/V calls when the mouse was
not moving for a few seconds.
Instead, `app.processEvents` is now used, even though the documentation discourages its
use: in this context, it should be fine, and it's a simple solution.
Buffer and wait for remote description to be set before sending ICE candidate. This avoids
the sending of ICE candidates before the negotiation is done.
- Instructions have been checked and updated. OS packages dependencies have been added for
Arch Linux.
- Added missing package.
- Reordered/refreshed instructions.
- Old/not relevant content has been removed.
- Tested on latest docker images of Debian/Arch/Unbutu.
rel 466