Mercurial > libervia-web
view libervia/web/pages/lists/page_meta.py @ 1616:6bfeb9f0fb84
browser (calls): conferences implementation:
- Handle A/V conferences calls creation/joining by entering a conference room JID in the
search box.
- Group call box has been improved and is used both for group calls (small number of
participants) and A/V conferences (larger number of participants).
- Fullscreen button for group call is working.
- Avatar/user nickname are shown in group call on peer user, as an overlay on video
stream.
- Use `user` metadata when present to display the right user avatar/name when receiving a
stream from SFU (i.e. A/V conference).
- Peer user have a new 3 dots menu with a `pin` item to (un)pin it (i.e. display it on
full container with on top).
- Updated webrtc to handle unidirectional streams correctly and to adapt to A/V conference
specification.
rel 448
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 07 Aug 2024 00:01:57 +0200 |
parents | eb00d593801d |
children |
line wrap: on
line source
#!/usr/bin/env python3 from libervia.web.server.constants import Const as C from twisted.words.protocols.jabber import jid from libervia.backend.core.i18n import _, D_ from libervia.backend.core.log import getLogger from libervia.backend.tools.common import data_format log = getLogger(__name__) name = "lists_disco" label = D_("Lists Discovery") access = C.PAGES_ACCESS_PUBLIC template = "list/discover.html" async def prepare_render(self, request): profile = self.get_profile(request) template_data = request.template_data template_data["url_list_create"] = self.get_page_by_name("list_create").url lists_directory_config = self.host.options["lists_directory_json"] lists_directory = request.template_data["lists_directory"] = [] if lists_directory_config: try: for list_data in lists_directory_config: service = list_data["service"] node = list_data["node"] name = list_data["name"] url = self.get_page_by_name("lists").get_url(service, node) lists_directory.append({"name": name, "url": url, "from_config": True}) except KeyError as e: log.warning("Missing field in lists_directory_json: {msg}".format(msg=e)) except Exception as e: log.warning("Can't decode lists directory: {msg}".format(msg=e)) if profile is not None: try: lists_list_raw = await self.host.bridge_call("lists_list", "", "", profile) except Exception as e: log.warning( _("Can't get list of registered lists for {profile}: {reason}") .format(profile=profile, reason=e) ) else: lists_list = data_format.deserialise(lists_list_raw, type_check=list) for list_data in lists_list: service = list_data["service"] node = list_data["node"] list_data["url"] = self.get_page_by_name("lists").get_url(service, node) list_data["from_config"] = False lists_directory.append(list_data) icons_names = set() for list_data in lists_directory: try: icons_names.add(list_data['icon_name']) except KeyError: pass if icons_names: template_data["icons_names"] = icons_names def on_data_post(self, request): jid_str = self.get_posted_data(request, "jid") try: jid_ = jid.JID(jid_str) except RuntimeError: self.page_error(request, C.HTTP_BAD_REQUEST) # for now we just use default node url = self.get_page_by_name("lists").get_url(jid_.full(), "@") self.http_redirect(request, url)