%ents; ]>
Data Forms Media Element This document specifies an XMPP protocol extension for including media data in XEP-0004 data forms. &LEGALNOTICE; 0221 Experimental Standards Track Standards XMPP Core XEP-0004 None None TO BE ASSIGNED &ianpaterson; &stpeter; 0.1 2007-07-11 psa/ip Initial version, split off from XEP-0158.

In certain protocols that make use of &xep0004;, it can be helpful to include media data such as small images. One example of such a "using protocol" is &xep0158;. This document defines a method for including media data in a data form.

The root element for media data is <media/>. This element MUST be qualified by the "http://www.xmpp.org/extensions/xep-0221.html#ns' namespace &NSNOTE;. The <media/> element MUST be contained within a <field/> element qualified by the 'jabber:x:data' namespace.

If the media is an image or video then the <media/> element SHOULD include 'height' and 'width' attributes specifying the recommended display size of the media in pixels.

The <media/> element SHOULD contain at least one <uri/> element to specify the out-of-band location of the media data. Constrained execution environments prevent some clients from rendering media unless it has been received out-of-band (e.g., Web clients). The <uri/> element MUST contain a URI that indicates the location.

The <media/> element MAY also contain one or more <data/> elements for distributing the media in-band. The <data/> element MUST contain the media data encoded according to Base64 as specified in Section 4 of &rfc4648;. The encoded data SHOULD NOT be larger than 8 kilobytes. If a stanza contains more than one <data/> element, the sending entity MUST take care not to trigger server-defined bandwidth limits.

Each <uri/> or <data/> element MUST include a 'type' atribute that specifies the MIME type (see &rfc2045;) of the media.

http://victim.example.com/challenges/speech.wav?F3A6292C http://victim.example.com/challenges/speech.ogg?F3A6292C http://victim.example.com/challenges/speech.mp3?F3A6292C ** Base64 encoded audio ** ]]>

Until this specification advances to a status of Draft, its associated namespace shall be "http://www.xmpp.org/extensions/xep-0221.html#ns"; upon advancement of this specification, the ®ISTRAR; shall issue a permanent namespace in accordance with the process defined in Section 4 of &xep0053;.

]]>