agsantos | 1e7736c | 2020-10-28 14:39:13 -0400 | [diff] [blame] | 1 | |
| 2 | Create (or Delete) a preference: PREFERENCE (-del) |
| 3 | |
| 4 | A preference is a internal variable that can be used upon loading or while |
| 5 | running the plugin. It should be correctly formed and listed in a preferences.json |
| 6 | file. Also, a preference value only can be modified during runtime if the code that |
| 7 | applies the new value is within your functionality implementation. For more |
| 8 | technical information, please refer to: |
| 9 | https://git.jami.net/savoirfairelinux/ring-project/wikis/technical/7.-Jami-plugins . |
| 10 | |
| 11 | Prior continuing, and to easy the process of constructing your preferences, take your |
| 12 | time to think about the list of preferences you will be needing. |
| 13 | But do not worry! If you forget something you will have the oportunity to change it |
| 14 | later. |
| 15 | |
| 16 | Example 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 | |
| 42 | For more detailed information for each of the preferences types, please specify the preference type: |
| 43 | -> preference -h list |
| 44 | -> preference -h path |