From 6d9e2957410a5e7f8789c1d34b31b3e222f159a6 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sun, 27 Feb 2022 18:56:08 +0100 Subject: [PATCH] Update "File Thumbnails" - Rename from "Thumbnails" to prevent a XML tag clash with Jingle Content Thumbnails - Prepend a "proto:" to the chosen xmlns to prevent issues with live XEPs - Add information about this not-really-proto XEP --- ...umbnails.md => xep-xxxx-file-thumbnails.md | 50 +++++++++++-------- 1 file changed, 29 insertions(+), 21 deletions(-) rename xep-xxxx-thumbnails.md => xep-xxxx-file-thumbnails.md (61%) diff --git a/xep-xxxx-thumbnails.md b/xep-xxxx-file-thumbnails.md similarity index 61% rename from xep-xxxx-thumbnails.md rename to xep-xxxx-file-thumbnails.md index b0932b2..3fefc8e 100644 --- a/xep-xxxx-thumbnails.md +++ b/xep-xxxx-file-thumbnails.md @@ -1,4 +1,4 @@ -# Thumbnails +# File Thumbnails ## Introduction When sending media, it is often helpful for users when a thumbnail can be shown before the @@ -14,42 +14,43 @@ This document specifies are more general and extensible element for specifiying ## Usage ```xml - - LEHV6nWB2yk8pyoJadR*.7kCMdnj + + LEHV6nWB2yk8pyoJadR*.7kCMdnj ``` -In this example, the thumbnail is specified of type `blurhash`, which means that a supporting -client should decode the `` element using the [Blurhash](https://github.com/woltapp/blurhash) algorithm. +In this example, the thumbnail is specified of type `proto:urn:xmpp:file-thumbnails:0:blurhash`, which means that a supporting +client should decode the `` element using the [Blurhash](https://github.com/woltapp/blurhash) algorithm. In order to enable a sort-of interoperability with [Jingle Content Thumbnails](https://xmpp.org/extensions/xep-0264.html), a type -`urn:xmpp:thumbs:0` is defined. If this is specified, then a supporting client must -interpret the child of the `` as an `` element as specified by -:[Jingle Content Thumbnails](https://xmpp.org/extensions/xep-0264.html) +`proto:urn:xmpp:file-thumbnails:0:jct` is defined. -``` - - - - +```xml + + ``` In the case of [Jingle Content Thumbnails](https://xmpp.org/extensions/xep-0264.html) compatibility, -the `` element must contain exactly one `` element. +the `` element must contain exactly one `` element. -Other extensions may define similar types. Note that the content of the `` element -is dependent on the type specified in the `` +Other extensions may define similar types. Note that the content of the `` element +is dependent on the type specified in the `` element. ### Thumbnail Types #### Blurhash -If a sender specifies the type to be of `blurhash`, then the payload must contain the +If a sender specifies the type to be of `proto:urn:xmpp:file-thumbnails:0:blurhash`, then the `` element must contain the image data as specified by the [Blurhash](https://github.com/woltapp/blurhash) algorithm. Care should be taken to prevent the blurhash data from growing to large in order to prevent hitting the stanza size limit. -## Usage with Stateless Inline Media Sharing +### Jingle Content Thumbnail Compatability + +If a sender specified the type to be of `proto:urn:xmpp:file-thumbnails:0:jct`, then the `` +element must contain exactly one `` element. + +## Usage Example with Stateless Inline Media Sharing NOTE: This example is taken from [Stateless Inline Media Sharing](https://xmpp.org/extensions/xep-0385.html) and modified for this protocol. @@ -65,13 +66,13 @@ NOTE: This example is taken from [Stateless Inline Media Sharing](https://xmpp.o 2XarmwTlNxDAMkvymloX3S5+VbylNrJt/l5QyPa+YoU= 2AfMGH8O7UNPTvUVAM9aK13mpCY= Photo from the summit. - + - - LEHV6nWB2yk8pyoJadR*.7kCMdnj + + LEHV6nWB2yk8pyoJadR*.7kCMdnj @@ -86,3 +87,10 @@ NOTE: This example is taken from [Stateless Inline Media Sharing](https://xmpp.o ## Security Considerations The same considerations apply as specified by [Jingle Content Thumbnails](https://xmpp.org/extensions/xep-0264.html). + +## Info + +| Key | Value | +| --- | --- | +| Author | PapaTutuWawa | +| Version | 0.0.2 |