Mercurial > libervia-web
view libervia/web/pages/blog/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.backend.core.i18n import _ from libervia.web.server.constants import Const as C from twisted.words.protocols.jabber import jid from twisted.internet import defer from libervia.web.server import session_iface from libervia.backend.tools.common import data_format from libervia.backend.core.log import getLogger log = getLogger(__name__) name = "blog" access = C.PAGES_ACCESS_PUBLIC template = "blog/discover.html" async def prepare_render(self, request): profile = self.get_profile(request) template_data = request.template_data if profile is not None: __, entities_own, entities_roster = await self.host.bridge_call( "disco_find_by_features", [], [("pubsub", "pep")], True, False, True, True, True, profile, ) entities = template_data["disco_entities"] = ( list(entities_own.keys()) + list(entities_roster.keys()) ) entities_url = template_data["entities_url"] = {} identities = self.host.get_session_data( request, session_iface.IWebSession ).identities d_list = {} for entity_jid_s in entities: entities_url[entity_jid_s] = self.get_page_by_name("blog_view").get_url( entity_jid_s ) if entity_jid_s not in identities: d_list[entity_jid_s] = self.host.bridge_call( "identity_get", entity_jid_s, [], True, profile) identities_data = await defer.DeferredList(d_list.values()) entities_idx = list(d_list.keys()) for idx, (success, identity_raw) in enumerate(identities_data): entity_jid_s = entities_idx[idx] if not success: log.warning(_("Can't retrieve identity of {entity}") .format(entity=entity_jid_s)) else: identities[entity_jid_s] = data_format.deserialise(identity_raw) template_data["url_blog_edit"] = self.get_sub_page_url(request, "blog_edit") 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) url = self.get_page_by_name("blog_view").get_url(jid_.full()) self.http_redirect(request, url)