Mercurial > libervia-desktop-kivy
annotate libervia/desktop_kivy/plugins/plugin_wid_calls.kv @ 508:d87b9a6b0b69
doc (calls): updated documentation to describe the new UI features:
fix 425
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 25 Oct 2023 15:29:33 +0200 |
parents | 0480f883f0a6 |
children | 97ab236e8f20 |
rev | line source |
---|---|
499
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 # desktop/mobile frontend for Libervia XMPP client |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
2 # Copyright (C) 2016-2023 Jérôme Poisson (goffi@goffi.org) |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 # This program is free software: you can redistribute it and/or modify |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
5 # it under the terms of the GNU Affero General Public License as published by |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 # the Free Software Foundation, either version 3 of the License, or |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 # (at your option) any later version. |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 # This program is distributed in the hope that it will be useful, |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 # GNU Affero General Public License for more details. |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
13 |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 # You should have received a copy of the GNU Affero General Public License |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 |
506 | 17 <CallControlButton>: |
18 size_hint: None, None | |
19 size: "50dp", "50dp" | |
20 color: 1, 1, 1, 1 | |
21 background_color: (0.28, 0.78, 0.56, 1) if self.active else (1.0, 0.88, 0.54, 1) | |
22 canvas.before: | |
23 Color: | |
24 rgba: root.background_color | |
25 Rectangle: | |
26 size: (self.width - 2*dp(self.margin_x), self.height - 2*dp(self.margin_y)) | |
27 pos: (self.x + dp(self.margin_x), self.y + dp(self.margin_y)) | |
28 canvas.after: | |
29 Color: | |
30 rgba: (1, 0, 0, 1) if not self.active else (0, 0, 0, 0) | |
31 Line: | |
32 points: [self.x + dp(10), self.y + dp(10), self.right - dp(10), self.top - dp(10)] | |
33 width: 2 | |
34 cap: "round" | |
499
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
35 |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
36 <Calls>: |
506 | 37 jid_selector: jid_selector |
38 call_layout: call_layout | |
499
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
39 remote_video: remote_video |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
40 local_video: local_video |
506 | 41 screen_manager: screen_manager |
42 call_screen: call_screen | |
43 ScreenManager: | |
44 id: screen_manager | |
45 SearchScreen: | |
46 name: "search" | |
47 JidSelector: | |
48 id: jid_selector | |
49 on_select: root.on_jid_select(args[1]) | |
50 to_show: ["roster"] | |
51 InCallScreen: | |
52 id: call_screen | |
53 name: "call" | |
54 remote_video: remote_video | |
55 local_video: local_video | |
56 orientation: "vertical" | |
57 FloatLayout: | |
58 id: call_layout | |
59 pos_hint: {"x": 0, "y": 0} | |
60 size_hint: 1, 1 | |
499
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
61 |
506 | 62 VideoStreamWidget: |
63 id: remote_video | |
64 size: call_layout.size | |
65 pos: call_layout.pos | |
66 fit_mode: "contain" | |
67 canvas.before: | |
68 Color: | |
69 rgba: (0, 0, 0, 1) | |
70 Rectangle: | |
71 pos: self.pos | |
72 size: self.size | |
73 | |
74 VideoStreamWidget: | |
75 id: local_video | |
76 size_hint: 0.25, 0.25 | |
77 pos_hint: {"right": 1, "bottom": 0} | |
78 fit_mode: "contain" | |
79 canvas.before: | |
80 Color: | |
81 rgba: (0, 0, 0, 1) | |
82 Rectangle: | |
83 pos: self.pos | |
84 size: self.size | |
499
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
85 |
506 | 86 CallControlButton: |
87 id: full_screen_btn | |
88 size: "60dp", "60dp" | |
89 pos_hint: {"right": 1, "top": 1} | |
90 margin_x: dp(10) | |
91 margin_y: dp(10) | |
92 symbol: "resize-small" if root.fullscreen else "resize-full" | |
93 color: 0.29, 0.29, 0.29, 1 | |
94 background_color: 0.96, 0.96, 0.96, 1 | |
95 on_press: root.fullscreen = not root.fullscreen | |
96 | |
97 | |
98 BoxLayout: | |
99 id: call_controls | |
100 orientation: "horizontal" | |
101 size_hint: 0.5, None # Adjusted to 50% of the width | |
102 height: "50dp" | |
103 pos_hint: {"x": 0.25, "y": 0.05} # Adjusted starting position | |
104 spacing: "30dp" | |
105 Widget: | |
106 | |
107 CallControlButton: | |
108 symbol: "videocam" | |
109 active: not root.video_muted | |
110 on_press: root.video_muted = not root.video_muted | |
111 | |
112 CallControlButton: | |
113 symbol: "volume-up" | |
114 active: not root.audio_muted | |
115 on_press: root.audio_muted = not root.audio_muted | |
116 | |
117 | |
118 CallControlButton: | |
119 symbol: "phone" | |
120 background_color: 0.95, 0.27, 0.41, 1 | |
121 on_press: root.hang_up() | |
122 canvas.before: | |
123 PushMatrix | |
124 Rotate: | |
125 angle: 225 | |
126 origin: self.center | |
127 canvas.after: | |
128 PopMatrix | |
129 | |
130 Widget: | |
499
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
131 |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
132 |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
133 <CallButton>: |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
134 size_hint: None, 1 |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
135 text: "Hang Up" if self.parent_widget.in_call else "Call" |
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
136 background_color: (1, 0, 0, 1) if self.parent_widget.in_call else (0, 1, 0, 1) |