Mercurial > libervia-desktop-kivy
annotate libervia/desktop_kivy/plugins/plugin_wid_calls.kv @ 518:196483685a63 default tip
Use Font-Awesome instead of Fontello, following change in Libervia Media.
| author | Goffi <goffi@goffi.org> |
|---|---|
| date | Sat, 26 Oct 2024 22:44:37 +0200 |
| parents | d78728d7fd6a |
| children |
| 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 |
|
510
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
17 |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
18 <WindowSelectButton>: |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
19 size_hint_y: None |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
20 height: '44dp' |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
21 color: 0.8, 0.8, 0.8, 1 |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
22 |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
23 |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
24 <DesktopScreenDialog>: |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
25 title: "Select a Screen or Window" |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
26 size_hint: 0.8, 0.8 |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
27 windows_buttons: windows_buttons |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
28 BoxLayout: |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
29 orientation: "vertical" |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
30 ScrollView: |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
31 BoxLayout: |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
32 id: windows_buttons |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
33 orientation: "vertical" |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
34 size_hint_y: None |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
35 height: self.minimum_height |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
36 WindowSelectButton: |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
37 text: "Full Screen" |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
38 on_press: root.on_window_selected(None, None) |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
39 |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
40 Button: |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
41 size_hint_y: None |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
42 height: '44dp' |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
43 text: 'Close' |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
44 on_release: root.dismiss() |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
45 |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
46 |
| 506 | 47 <CallControlButton>: |
| 48 size_hint: None, None | |
| 49 size: "50dp", "50dp" | |
| 50 color: 1, 1, 1, 1 | |
| 51 background_color: (0.28, 0.78, 0.56, 1) if self.active else (1.0, 0.88, 0.54, 1) | |
| 52 canvas.before: | |
| 53 Color: | |
| 54 rgba: root.background_color | |
| 55 Rectangle: | |
| 56 size: (self.width - 2*dp(self.margin_x), self.height - 2*dp(self.margin_y)) | |
| 57 pos: (self.x + dp(self.margin_x), self.y + dp(self.margin_y)) | |
| 58 canvas.after: | |
| 59 Color: | |
| 60 rgba: (1, 0, 0, 1) if not self.active else (0, 0, 0, 0) | |
| 61 Line: | |
| 62 points: [self.x + dp(10), self.y + dp(10), self.right - dp(10), self.top - dp(10)] | |
| 63 width: 2 | |
| 64 cap: "round" | |
|
499
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
65 |
|
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
66 <Calls>: |
| 506 | 67 jid_selector: jid_selector |
| 68 call_layout: call_layout | |
|
499
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
69 remote_video: remote_video |
|
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
70 local_video: local_video |
| 506 | 71 screen_manager: screen_manager |
| 72 call_screen: call_screen | |
| 73 ScreenManager: | |
| 74 id: screen_manager | |
| 75 SearchScreen: | |
| 76 name: "search" | |
| 77 JidSelector: | |
| 78 id: jid_selector | |
| 79 on_select: root.on_jid_select(args[1]) | |
| 80 to_show: ["roster"] | |
| 81 InCallScreen: | |
| 82 id: call_screen | |
| 83 name: "call" | |
| 84 remote_video: remote_video | |
| 85 local_video: local_video | |
| 86 orientation: "vertical" | |
| 87 FloatLayout: | |
| 88 id: call_layout | |
| 89 pos_hint: {"x": 0, "y": 0} | |
| 90 size_hint: 1, 1 | |
|
499
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
91 |
| 506 | 92 VideoStreamWidget: |
| 93 id: remote_video | |
| 94 size: call_layout.size | |
| 95 pos: call_layout.pos | |
| 96 fit_mode: "contain" | |
| 97 canvas.before: | |
| 98 Color: | |
| 99 rgba: (0, 0, 0, 1) | |
| 100 Rectangle: | |
| 101 pos: self.pos | |
| 102 size: self.size | |
| 103 | |
| 104 VideoStreamWidget: | |
| 105 id: local_video | |
| 106 size_hint: 0.25, 0.25 | |
| 107 pos_hint: {"right": 1, "bottom": 0} | |
| 108 fit_mode: "contain" | |
| 109 canvas.before: | |
| 110 Color: | |
| 111 rgba: (0, 0, 0, 1) | |
| 112 Rectangle: | |
| 113 pos: self.pos | |
| 114 size: self.size | |
|
499
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
115 |
| 506 | 116 CallControlButton: |
| 117 id: full_screen_btn | |
| 118 size: "60dp", "60dp" | |
| 119 pos_hint: {"right": 1, "top": 1} | |
| 120 margin_x: dp(10) | |
| 121 margin_y: dp(10) | |
|
518
196483685a63
Use Font-Awesome instead of Fontello, following change in Libervia Media.
Goffi <goffi@goffi.org>
parents:
514
diff
changeset
|
122 symbol: "minimize" if root.fullscreen else "maximize" |
| 506 | 123 color: 0.29, 0.29, 0.29, 1 |
| 124 background_color: 0.96, 0.96, 0.96, 1 | |
| 125 on_press: root.fullscreen = not root.fullscreen | |
| 126 | |
| 127 | |
| 128 BoxLayout: | |
| 129 id: call_controls | |
| 130 orientation: "horizontal" | |
|
510
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
131 size_hint: 0.5, None |
| 506 | 132 height: "50dp" |
|
510
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
133 pos_hint: {"x": 0.25, "y": 0.05} |
| 506 | 134 spacing: "30dp" |
| 135 Widget: | |
| 136 | |
| 137 CallControlButton: | |
|
518
196483685a63
Use Font-Awesome instead of Fontello, following change in Libervia Media.
Goffi <goffi@goffi.org>
parents:
514
diff
changeset
|
138 symbol: "video" |
| 506 | 139 active: not root.video_muted |
| 140 on_press: root.video_muted = not root.video_muted | |
| 141 | |
| 142 CallControlButton: | |
|
518
196483685a63
Use Font-Awesome instead of Fontello, following change in Libervia Media.
Goffi <goffi@goffi.org>
parents:
514
diff
changeset
|
143 symbol: "volume-high" |
| 506 | 144 active: not root.audio_muted |
| 145 on_press: root.audio_muted = not root.audio_muted | |
| 146 | |
|
510
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
147 CallControlButton: |
|
518
196483685a63
Use Font-Awesome instead of Fontello, following change in Libervia Media.
Goffi <goffi@goffi.org>
parents:
514
diff
changeset
|
148 symbol: "display" |
|
510
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
149 active: root.desktop_sharing |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
150 background_color: (0.28, 0.78, 0.56, 1) if not self.active else (0.95, 0.27, 0.41, 1) |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
151 on_press: root.on_desktop_btn_press() |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
152 canvas.after: |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
153 Color: |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
154 rgba: (0, 0, 0, 0) if self.active else (0.4, 0.4, 0.4, 1) |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
155 Line: |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
156 points: [self.x + dp(10), self.y + dp(10), self.right - dp(10), self.top - dp(10)] |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
157 width: 2 |
|
97ab236e8f20
plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents:
506
diff
changeset
|
158 cap: "round" |
|
514
d78728d7fd6a
plugin wid calls, core: implements WebRTC DataChannel file transfer:
Goffi <goffi@goffi.org>
parents:
510
diff
changeset
|
159 CallControlButton: |
|
518
196483685a63
Use Font-Awesome instead of Fontello, following change in Libervia Media.
Goffi <goffi@goffi.org>
parents:
514
diff
changeset
|
160 symbol: "regular file" |
|
514
d78728d7fd6a
plugin wid calls, core: implements WebRTC DataChannel file transfer:
Goffi <goffi@goffi.org>
parents:
510
diff
changeset
|
161 color: 0, 0, 0, 1 |
|
d78728d7fd6a
plugin wid calls, core: implements WebRTC DataChannel file transfer:
Goffi <goffi@goffi.org>
parents:
510
diff
changeset
|
162 background_color: (1, 1, 1, 1) |
|
d78728d7fd6a
plugin wid calls, core: implements WebRTC DataChannel file transfer:
Goffi <goffi@goffi.org>
parents:
510
diff
changeset
|
163 on_press: root.on_file_btn_press() |
| 506 | 164 |
| 165 CallControlButton: | |
| 166 symbol: "phone" | |
| 167 background_color: 0.95, 0.27, 0.41, 1 | |
| 168 on_press: root.hang_up() | |
| 169 canvas.before: | |
| 170 PushMatrix | |
| 171 Rotate: | |
| 172 angle: 225 | |
| 173 origin: self.center | |
| 174 canvas.after: | |
| 175 PopMatrix | |
| 176 | |
| 177 Widget: | |
|
499
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
178 |
|
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
179 |
|
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
180 <CallButton>: |
|
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
181 size_hint: None, 1 |
|
f387992d8e37
plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
182 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
|
183 background_color: (1, 0, 0, 1) if self.parent_widget.in_call else (0, 1, 0, 1) |
