Mercurial > libervia-web
view libervia/web/pages/_browser/popup.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 | f52b89365002 |
children |
line wrap: on
line source
from browser import document, timer from js_modules.tippy_js import tippy def create_popup( target, content_elt, focus_class="has-popup-focus", focus_elt=None, **kwargs ): """Create a popup and show a popup below a target The popup is created and destroyed on each call, this can be used for dynamic content. @param target: element where the popup will appear, or a selector @param content_elt: HTML element to show in the popup @param focus_class: class added to target element when popup is shown @param focus_elt: element where focus_class is added. If None, target will be used. @param kwargs: arguments used to override tippy options """ if focus_elt is None: focus_elt = target def on_hide(__): focus_elt.classList.remove(focus_class) timer.set_timeout(tippy_instance.destroy, 0) tippy_opts = { "trigger": "click", "content": content_elt, "appendTo": document.body, "placement": "bottom", "interactive": True, "trigger": "manual", "theme": "light", "onShow": lambda __: focus_elt.classList.add(focus_class), "onHide": on_hide } tippy_opts.update(kwargs) tippy_instance = tippy( target, tippy_opts ) tippy_instance.show() return tippy_instance