Mercurial > prosody-modules
annotate mod_muc_media_metadata/README.markdown @ 5627:3a5cf8d80089
mod_http_oauth2: Tweak method of centering the UI
The percentage here was relative to the viewport width, which on some
very wide screens may put the UI slightly outside of the view, requiring
scrolling to see.
By using a unit relative to the height of the viewport, this is avoided
and should work better. But no guarantees, it's still possible to resize
the browser or adjust font sizes so that the UI goes out of view.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 31 Jul 2023 07:28:09 +0200 |
parents | 0e1e775bdea0 |
children |
rev | line source |
---|---|
4100
20d436a1028d
mod_muc_media_metadata: Add alpha tag and experimental warning
Matthew Wild <mwild1@gmail.com>
parents:
3687
diff
changeset
|
1 --- |
20d436a1028d
mod_muc_media_metadata: Add alpha tag and experimental warning
Matthew Wild <mwild1@gmail.com>
parents:
3687
diff
changeset
|
2 labels: |
20d436a1028d
mod_muc_media_metadata: Add alpha tag and experimental warning
Matthew Wild <mwild1@gmail.com>
parents:
3687
diff
changeset
|
3 - 'Stage-Alpha' |
20d436a1028d
mod_muc_media_metadata: Add alpha tag and experimental warning
Matthew Wild <mwild1@gmail.com>
parents:
3687
diff
changeset
|
4 summary: 'Experimental module to add metadata to media in MUCs' |
20d436a1028d
mod_muc_media_metadata: Add alpha tag and experimental warning
Matthew Wild <mwild1@gmail.com>
parents:
3687
diff
changeset
|
5 ... |
20d436a1028d
mod_muc_media_metadata: Add alpha tag and experimental warning
Matthew Wild <mwild1@gmail.com>
parents:
3687
diff
changeset
|
6 |
3682
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 # Introduction |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 This module adds additional metadata to media shared in a MUC. This can help clients |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 make decisions and provide better UI and enhanced privacy, by knowing things like file |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 size without needing to make external network requests. |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 |
4101
0e1e775bdea0
mod_muc_media_metadata: Bootstrap warning box
Kim Alvefur <zash@zash.se>
parents:
4100
diff
changeset
|
13 ::: {.alert .alert-danger} |
4100
20d436a1028d
mod_muc_media_metadata: Add alpha tag and experimental warning
Matthew Wild <mwild1@gmail.com>
parents:
3687
diff
changeset
|
14 **NOTE:** This is an experimental module. It is not supported by any |
20d436a1028d
mod_muc_media_metadata: Add alpha tag and experimental warning
Matthew Wild <mwild1@gmail.com>
parents:
3687
diff
changeset
|
15 clients, and therefore is mainly of interest to client developers who |
20d436a1028d
mod_muc_media_metadata: Add alpha tag and experimental warning
Matthew Wild <mwild1@gmail.com>
parents:
3687
diff
changeset
|
16 wish to explore the idea. |
4101
0e1e775bdea0
mod_muc_media_metadata: Bootstrap warning box
Kim Alvefur <zash@zash.se>
parents:
4100
diff
changeset
|
17 ::: |
4100
20d436a1028d
mod_muc_media_metadata: Add alpha tag and experimental warning
Matthew Wild <mwild1@gmail.com>
parents:
3687
diff
changeset
|
18 |
3682
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
19 # Configuring |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
20 |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
21 ## Enabling |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 ``` {.lua} |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 Component "rooms.example.net" "muc" |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 modules_enabled = { |
3684
0f3cb1247682
mod_muc_media_metadata: Fix example config
Matthew Wild <mwild1@gmail.com>
parents:
3683
diff
changeset
|
26 "muc_media_metadata"; |
3682
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 } |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 ``` |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
29 |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
30 ## Settings |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
31 |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
32 There are no configuration options for this module. |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
33 |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
34 # Developers |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
35 |
3687
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
36 ## Example stanzas |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
37 |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
38 A normal message in a chatroom containing an image: |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
39 |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
40 ``` |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
41 <message from="test@rooms.example.com/matthew" id="9f45a784-5e5b-4db5-a9b3-8ea1d7c1162d" type="groupchat"> |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
42 <body>https://matthewwild.co.uk/share.php/70334772-ff74-439b-8173-a71e40ca28db/mam-flow.png</body> |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
43 <x xmlns="jabber:x:oob"> |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
44 <url>https://matthewwild.co.uk/share.php/70334772-ff74-439b-8173-a71e40ca28db/mam-flow.png</url> |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
45 </x> |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
46 </message> |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
47 ``` |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
48 |
c40422cca3b7
mod_muc_media_metadata: Include original message stanza example
Matthew Wild <mwild1@gmail.com>
parents:
3686
diff
changeset
|
49 The same stanza with this module loaded now contains additional metadata added by the server: |
3682
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
50 |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
51 ``` |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
52 <message from="test@rooms.example.com/matthew" id="9f45a784-5e5b-4db5-a9b3-8ea1d7c1162d" type="groupchat"> |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
53 <body>https://matthewwild.co.uk/share.php/70334772-ff74-439b-8173-a71e40ca28db/mam-flow.png</body> |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
54 <x xmlns="jabber:x:oob"> |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
55 <url>https://matthewwild.co.uk/share.php/70334772-ff74-439b-8173-a71e40ca28db/mam-flow.png</url> |
3686
2573d143621f
mod_muc_media_metadata: Update namespace
Matthew Wild <mwild1@gmail.com>
parents:
3684
diff
changeset
|
56 <metadata xmlns="xmpp:prosody.im/protocol/media-metadata#0"> |
3682
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
57 <bytes>15690</bytes> |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
58 <type>image/png</type> |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
59 <blurhash>LEHV6nWB2yk8pyo0adR*.7kCMdnj</blurhash> |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
60 </metadata> |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
61 </x> |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
62 </message> |
47e1c94fb6fb
mod_muc_media_metadata: Module to automatically fetch metadata for posted media
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
63 ``` |