annotate libervia/desktop_kivy/plugins/plugin_wid_calls.kv @ 514:d78728d7fd6a default tip

plugin wid calls, core: implements WebRTC DataChannel file transfer: - Add a new "file" icon in call UI to send a file via WebRTC. - Handle new preflight mechanism, and WebRTC file transfer. - Native file chooser handling has been moved to new `core.file_chooser` module, and now supports "save" and "dir" modes (based on `plyer`). rel 442
author Goffi <goffi@goffi.org>
date Sat, 06 Apr 2024 13:37:27 +0200
parents 97ab236e8f20
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
47 <CallControlButton>:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
48 size_hint: None, None
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
49 size: "50dp", "50dp"
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
50 color: 1, 1, 1, 1
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
51 background_color: (0.28, 0.78, 0.56, 1) if self.active else (1.0, 0.88, 0.54, 1)
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
52 canvas.before:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
53 Color:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
54 rgba: root.background_color
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
55 Rectangle:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
56 size: (self.width - 2*dp(self.margin_x), self.height - 2*dp(self.margin_y))
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
57 pos: (self.x + dp(self.margin_x), self.y + dp(self.margin_y))
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
58 canvas.after:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
59 Color:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
60 rgba: (1, 0, 0, 1) if not self.active else (0, 0, 0, 0)
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
61 Line:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
62 points: [self.x + dp(10), self.y + dp(10), self.right - dp(10), self.top - dp(10)]
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
63 width: 2
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
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
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
67 jid_selector: jid_selector
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
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
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
71 screen_manager: screen_manager
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
72 call_screen: call_screen
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
73 ScreenManager:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
74 id: screen_manager
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
75 SearchScreen:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
76 name: "search"
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
77 JidSelector:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
78 id: jid_selector
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
79 on_select: root.on_jid_select(args[1])
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
80 to_show: ["roster"]
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
81 InCallScreen:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
82 id: call_screen
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
83 name: "call"
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
84 remote_video: remote_video
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
85 local_video: local_video
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
86 orientation: "vertical"
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
87 FloatLayout:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
88 id: call_layout
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
89 pos_hint: {"x": 0, "y": 0}
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
90 size_hint: 1, 1
499
f387992d8e37 plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff changeset
91
506
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
92 VideoStreamWidget:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
93 id: remote_video
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
94 size: call_layout.size
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
95 pos: call_layout.pos
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
96 fit_mode: "contain"
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
97 canvas.before:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
98 Color:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
99 rgba: (0, 0, 0, 1)
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
100 Rectangle:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
101 pos: self.pos
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
102 size: self.size
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
103
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
104 VideoStreamWidget:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
105 id: local_video
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
106 size_hint: 0.25, 0.25
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
107 pos_hint: {"right": 1, "bottom": 0}
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
108 fit_mode: "contain"
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
109 canvas.before:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
110 Color:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
111 rgba: (0, 0, 0, 1)
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
112 Rectangle:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
113 pos: self.pos
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
114 size: self.size
499
f387992d8e37 plugins: new "call" plugin for A/V calls:
Goffi <goffi@goffi.org>
parents:
diff changeset
115
506
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
116 CallControlButton:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
117 id: full_screen_btn
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
118 size: "60dp", "60dp"
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
119 pos_hint: {"right": 1, "top": 1}
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
120 margin_x: dp(10)
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
121 margin_y: dp(10)
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
122 symbol: "resize-small" if root.fullscreen else "resize-full"
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
123 color: 0.29, 0.29, 0.29, 1
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
124 background_color: 0.96, 0.96, 0.96, 1
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
125 on_press: root.fullscreen = not root.fullscreen
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
126
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
127
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
128 BoxLayout:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
129 id: call_controls
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
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
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
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
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
134 spacing: "30dp"
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
135 Widget:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
136
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
137 CallControlButton:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
138 symbol: "videocam"
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
139 active: not root.video_muted
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
140 on_press: root.video_muted = not root.video_muted
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
141
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
142 CallControlButton:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
143 symbol: "volume-up"
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
144 active: not root.audio_muted
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
145 on_press: root.audio_muted = not root.audio_muted
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
146
510
97ab236e8f20 plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents: 506
diff changeset
147 CallControlButton:
97ab236e8f20 plugin calls: implement desktop sharing:
Goffi <goffi@goffi.org>
parents: 506
diff changeset
148 symbol: "desktop"
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:
d78728d7fd6a plugin wid calls, core: implements WebRTC DataChannel file transfer:
Goffi <goffi@goffi.org>
parents: 510
diff changeset
160 symbol: "doc"
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
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
164
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
165 CallControlButton:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
166 symbol: "phone"
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
167 background_color: 0.95, 0.27, 0.41, 1
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
168 on_press: root.hang_up()
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
169 canvas.before:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
170 PushMatrix
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
171 Rotate:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
172 angle: 225
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
173 origin: self.center
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
174 canvas.after:
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
175 PopMatrix
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
176
0480f883f0a6 plugin calls: update UI:
Goffi <goffi@goffi.org>
parents: 499
diff changeset
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)