From 4d3a3baacc121483e11f075e17a80c3c53da3053 Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Wed, 26 Aug 2015 13:28:21 -0700 Subject: [PATCH] Update XEP-0264 to allow non-cid URIs, and expand scope --- xep-0264.xml | 198 ++++++++++++++++++++++++++++----------------------- 1 file changed, 107 insertions(+), 91 deletions(-) diff --git a/xep-0264.xml b/xep-0264.xml index 7ca8722c..68684a6c 100644 --- a/xep-0264.xml +++ b/xep-0264.xml @@ -6,11 +6,11 @@
- File Transfer Thumbnails - This specification defines a way for a client supply a preview image for a file transfer. + Jingle Content Thumbnails + This specification defines a way for a client to supply a preview image for Jingle content. &LEGALNOTICE; 0264 - Deferred + Experimental Standards Track Standards Council @@ -28,6 +28,17 @@ ml@update.uu.se mlundblad@jabber.org + &lance; + + 0.4 + 2015-08-26 + ljts + +

Changed format to use generic 'uri' attribute to allow for 'https:' and 'http:' URIs in addition to BoB 'cid:' URIs.

+

Indicated that multiple thumbnails may be present.

+

Expanded scope of use cases to be Jingle content in general, not just file transfer.

+
+
0.3 2009-04-27 @@ -69,43 +80,15 @@ Added missing namespace on thumnail elements.

-

The current methods for file transfers include basic meta data about the -file being offered (name, size, and date). There currently is no way to provide an image thumbnail for files such as photos.

+

When offering a Jingle session, it can be helpful to provide a small preview of the offered content to help the session responder decide whether to accept or reject the session.

+

This is particularly useful for file transfer content (especially image files), but can also be used for things such as video (e.g. using a still frame from the stream as the preview thumbnail), and even audio by using a small image of album cover art.

-

This documents defines a way to include a thumbnail image as an additional metadata in a file transfer.

+

This documents defines a way to include a thumbnail image as an additional metadata in a Jingle content description.

- -

When a client wishes to supply a thumbnail in a transfer offer, it can do so by including an extra ]]> element as shown in the following exaples.

- - - - - - - - - - - - - - - - ]]> - -

The receiver MAY now request the data using the protocol defined in &xep0231;.

- +

When a client wishes to supply a thumbnail in a content offer, it can do so by including an extra <thumbnail/> element as shown in the following example:

+ - - - - This is a test. If this were a real file... - - - + + + image/jpeg + image.jpg + 3032449 + 552da749930852c69ae5d2141d3766b1 + This is a test. If this were a real file... + + - ... + - -]]> - - -

The following attributes are defined for the <thumbnail/> element.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributeDescriptionInclusion
cidA Content-ID that can be mapped to a cid: URL as specified in &rfc2111;. The 'cid' value SHOULD be of the form algo+hash@bob.xmpp.org, where the "algo" is the hashing algorithm used (e.g., "sha1" for the SHA-1 algorithm as specified in &rfc3174;) and the "hash" is the hex output of the algorithm applied to the binary data itself.REQUIRED
mime-typeThe value of the 'mime-type' attribute MUST match the syntax specified in &rfc2045;. That is, the value MUST include a top-level media type, the "/" character, and a subtype; in addition, it MAY include one or more optional parameters (e.g., the "audio/ogg" MIME type in the example shown below includes a "codecs" parameter as specified in &rfc4281;). The "type/subtype" string SHOULD be registered in the &ianamedia;, but MAY be an unregistered or yet-to-be-registered value.RECOMMENDED
widthThe intended display width of the thumbnail image. Used as a hint for the receiving client to prepare i.e. a dialog window.OPTIONAL
heightThe intended display height of the thumbnail image. Used as a hint for the receiving client to prepare i.e. a dialog window.OPTIONAL
+]]>
- +

Thumbnails MAY be included for Jingle content other than file transfer. For example, with Jingle RTP video a thumbnail could be included to show who is calling (either by capturing a still frame from the input stream or by using an existing profile image):

+ + + + + + + + + + + + + + + 128 + + + + + +]]> + +

Multiple <thumbnail/> elements MAY be included to provide thumbnails of different sizes, media types, or URIs.

+ +

If the provided URI has the scheme 'cid', then the thumbnail data MAY be requested using &xep0231;.

+
+ + +

The following attributes are defined for the <thumbnail/> element.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
AttributeDescriptionInclusion
uriA URI where the thumbnail data can be accessed (typically by using a URI scheme of 'cid:', 'https:', or 'http:'). If the URI scheme is 'cid:' then the identifier MUST refer to a bit of binary data as described in &xep0231;REQUIRED
media-typeThe value of the 'media-type' attribute MUST match the syntax specified in &rfc2045;. That is, the value MUST include a top-level media type, the "/" character, and a subtype; in addition, it MAY include one or more optional parameters. The "type/subtype" string SHOULD be registered in the &ianamedia;, but MAY be an unregistered or yet-to-be-registered value.RECOMMENDED
widthThe intended display width of the thumbnail image. Used as a hint for the receiving client to prepare the appropriate UI, such as a dialog window.OPTIONAL
heightThe intended display height of the thumbnail image. Used as a hint for the receiving client to prepare the appropriate UI, such as a dialog window.OPTIONAL

The inclusion of an image thumbnail may leak information about a transfer otherwise taking place on an e2e encrypted file transfer stream. A client MAY wish to not include a thumbnail.

-

A client MUST NOT rely on the values specified for the width and height of a thumbnail to allocate a bitmap data buffer for the thumbnail, to prevent possible DoS attacks. Also a client SHOULD apply implementation-specific limits on the thumbnails, if using these values to pepare a UI element for the thumbnail image, of f.ex. 128x128 pixels, values exceeding these would then be truncated and the thumbnail image scaled down when received.

+

A client MUST NOT rely on the values specified for the width and height of a thumbnail to allocate a bitmap data buffer for the thumbnail, to prevent possible DoS attacks. Also a client SHOULD apply implementation-specific limits on the thumbnails, if using these values to pepare a UI element for the thumbnail image, e.g. with dimensions of 128x128 pixels, values exceeding these would then be truncated and the thumbnail image scaled down when received.

This document requires no interaction with &IANA;.

@@ -183,7 +199,7 @@ wish to not include a thumbnail.

This specification defines the following XML namespace:

    -
  • urn:xmpp:thumbs:0
  • +
  • urn:xmpp:thumbs:1

The ®ISTRAR; includes this namespace in the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.

@@ -210,8 +226,8 @@ wish to not include a thumbnail.

- - + +