blob: 078c1a5ee7e41e4b073973dcbc31be076608238b [file] [log] [blame]
agsantos1e7736c2020-10-28 14:39:13 -04001
2Create (or Delete) a preference: PREFERENCE (-del)
3
4A preference is a internal variable that can be used upon loading or while
5running the plugin. It should be correctly formed and listed in a preferences.json
6file. Also, a preference value only can be modified during runtime if the code that
7applies the new value is within your functionality implementation. For more
8technical information, please refer to:
9https://git.jami.net/savoirfairelinux/ring-project/wikis/technical/7.-Jami-plugins .
10
11Prior continuing, and to easy the process of constructing your preferences, take your
12time to think about the list of preferences you will be needing.
13But do not worry! If you forget something you will have the oportunity to change it
14later.
15
16Example of preferences:
17 -> LIST:
18 {
19 "category" : "Streams",
20 "type": "List",
21 "key": "videostreams",
22 "title": "Streams to transform",
23 "summary": "Select video to transform",
24 "defaultValue": "0",
25 "entries": ["sent", "received"],
26 "entryValues": ["0", "1"],
27 "scope": "plugin"
28 }
29
30 -> PATH:
31 {
32 "category" : "Backgrounds",
33 "type": "Path",
34 "mimeType": "image/png",
35 "key": "background",
36 "title": "Background image",
37 "summary": "Select the image background to use",
38 "defaultValue": "data/backgrounds/background2.png",
39 "scope": "plugin, foo"
40 }
41
42For more detailed information for each of the preferences types, please specify the preference type:
43 -> preference -h list
44 -> preference -h path