view libervia/desktop_kivy/plugins/plugin_wid_calls.kv @ 499:f387992d8e37

plugins: new "call" plugin for A/V calls: this is the base implementation for calls plugin, handling one2one calls. For now, the interface is very basic, call is done by specifying the bare jid of the destinee, then press the "call" button. Incoming calls are automatically accepted. rel 424
author Goffi <goffi@goffi.org>
date Wed, 04 Oct 2023 22:54:36 +0200
parents
children 0480f883f0a6
line wrap: on
line source

# desktop/mobile frontend for Libervia XMPP client
# Copyright (C) 2016-2023 Jérôme Poisson (goffi@goffi.org)

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.

# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


<Calls>:
    remote_video: remote_video
    local_video: local_video
    orientation: 'vertical'
    FloatLayout:
        id: float_layout
        pos_hint: {'x': 0, 'y': 0}
        size_hint: 1, 1

        VideoStreamWidget:
            id: remote_video
            size: float_layout.size
            pos: float_layout.pos
            fit_mode: "contain"

        VideoStreamWidget:
            id: local_video
            size_hint: 0.25, 0.25
            pos_hint: {'right': 1, 'bottom': 0}
            fit_mode: "contain"
            canvas.before:
                Color:
                    rgba: (0, 0, 0, 0)
                Rectangle:
                    pos: self.pos
                    size: self.size


<CallButton>:
    size_hint: None, 1
    text: "Hang Up" if self.parent_widget.in_call else "Call"
    background_color: (1, 0, 0, 1) if self.parent_widget.in_call else (0, 1, 0, 1)