<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep xmlns="">
    <header>
        <title>Jingle Content Category</title>
        <abstract>This specification defines an XMPP extension to negotiate the use of Session Description Protocol (SDP) media-
   level attribute 'content' as defined by RFC 4796 with Jingle RTP sessions</abstract>
        
<legal>
<copyright>This XMPP Extension Protocol is copyright © 1999 – 2024 by the <link url="https://xmpp.org/">XMPP Standards Foundation</link> (XSF).</copyright>
<permissions>Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.</permissions>
<warranty>## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##</warranty>
<liability>In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.</liability>
<conformance>This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at &lt;<link url="https://xmpp.org/about/xsf/ipr-policy">https://xmpp.org/about/xsf/ipr-policy</link>&gt; or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).</conformance>
</legal>
        <number>xxxx</number>
        <status>ProtoXEP</status>
        <type>Standards Track</type>
        <sig>Standards</sig>
        <approver>Council</approver>
        <dependencies>
            <spec>XMPP Core</spec>
            <spec>XEP-0001</spec>
            <spec>XEP-0166</spec>
            <spec>XEP-0167</spec>
            <spec>RFC 4796</spec>
        </dependencies>
        <supersedes/>
        <supersededby/>
        <shortname>NOT_YET_ASSIGNED</shortname>
        
  <author>
    <firstname>Timothée</firstname>
    <surname>Jaussoin</surname>
    <email>edhelas@movim.eu</email>
    <jid>edhelas@movim.eu</jid>
    <uri>https://edhelas.movim.eu</uri>
  </author>

        <revision>
            <version>0.0.1</version>
            <date>2025-09-19</date>
            <initials>psa</initials>
            <remark>
                <p>First draft.</p>
            </remark>
        </revision>
    </header>
    <section1 topic="Introduction" anchor="intro">
        <p>The <span class="ref"><link url="https://xmpp.org/extensions/xep-0167.html">Jingle RTP Sessions (XEP-0167)</link></span> <note>XEP-0167: Jingle RTP Sessions &lt;<link url="https://xmpp.org/extensions/xep-0167.html">https://xmpp.org/extensions/xep-0167.html</link>&gt;.</note> already defines a way to map SDP medias to Jingle RTP sessions. This mapping is also defined through several other XEPs. Jingle allows several medias to be negotiated through 'content' elements, each content is mapped to one specific SDP media. When negotiating a Jingle sessions some of its content can be similar in the sense that their medias cannot be distinguished just by examining their description lines (e.g., two video streams).</p>
        <p>This document defines a new element 'category', based on the <span class="ref"><link url="http://tools.ietf.org/html/rfc4796">RFC 4796</link></span> <note>RFC 4796: The Session Description Protocol (SDP) Content Attribute &lt;<link url="http://tools.ietf.org/html/rfc4796">http://tools.ietf.org/html/rfc4796</link>&gt;.</note> SDP 'content' attribute, that allows applications to treat each of those contents differently.</p>
    </section1>
    <section1 topic="Protocol" anchor="protocol">
        <p>When an entity wishes to negotiate a new Jingle 'content' in a session it may want to categorize that content to help the other entities to understand how they should display it and adapt their interface in an appropriate manner.</p>

        <p>For example, if a user wants to share simultaneously its webcam and screen with a contact the applications involved may want to automatically adapt their interface to display those different types of content accordingly, e.g., putting the screencast in full-screen and displaying the contact's webcam in the corner.</p>

        <p>To categorize accordingly those different kinds of contents each entity SHOULD add one or several &lt;category/&gt; elements in the &lt;description/&gt; section qualified by the 'urn:xmpp:jingle:apps:category:0' having a 'name' attribute that MUST map to the <span class="ref"><link url="http://tools.ietf.org/html/rfc4796">RFC 4796</link></span> <note>RFC 4796: The Session Description Protocol (SDP) Content Attribute &lt;<link url="http://tools.ietf.org/html/rfc4796">http://tools.ietf.org/html/rfc4796</link>&gt;.</note> SDP 'content' attribute.</p>

        <table caption="The category 'name' attribute values as defined from the RFC 4796">
            <tr>
                <td>
                    <strong>Name</strong>
                </td>
                <td>
                    <strong>Description</strong>
                </td>
            </tr>
            <tr>
                <td>slides</td>
                <td>The media stream includes presentation slides</td>
            </tr>
            <tr>
                <td>speaker</td>
                <td>The media stream contains the image of the speaker</td>
            </tr>
            <tr>
                <td>sl</td>
                <td>The media stream contains sign language</td>
            </tr>
            <tr>
                <td>main</td>
                <td>The media stream is taken from the main source</td>
            </tr>
            <tr>
                <td>alt</td>
                <td>The media stream is taken from the alternative source</td>
            </tr>
        </table>
    </section1>

    <section1 topic="Mapping to Session Description Protocol" anchor="sdp">
        <p>The SDP extract bellow.</p>

        <code>
v=0
o=Stuart 292742730 29277831 IN IP4 138.143.71.89
s=Showing of my skills
c=IN IP4 138.143.71.2
t=0 0
m=video 52886 RTP/AVP 31
a=rtpmap:31 H261/9000
a=content:slides,alt
m=video 53334 RTP/AVP 31
a=rtpmap:31 H261/9000
a=content:speaker
m=video 54132 RTP/AVP 31
a=rtpmap:31 H261/9000
a=content:sl
        </code>

        <p>Should then map to:</p>

            <example caption="Server return the list of bookmarks"><![CDATA[
<iq from='stuart@studio.org/main'
    id='rg6s5134'
    to='noodle@home.tld/living'
    type='set'>
  <jingle xmlns='urn:xmpp:jingle:1'
          action='session-initiate'
          initiator='stuart@studio.org/main'
          sid='a73sjjvkla37jfea'>
    <content creator="initiator" name='video0'>
        <transport xmlns="urn:xmpp:jingle:transports:ice-udp:1"/>
        <description xmlns="urn:xmpp:jingle:apps:rtp:1" media="video">
            <category xmlns=']]>urn:xmpp:jingle:apps:category:0<![CDATA[' name='slides'/>
            <category xmlns=']]>urn:xmpp:jingle:apps:category:0<![CDATA[' name='alt'/>
            <payload-type id="31" name="H261" clockrate="9000"/>
        </description>
    </content>
    <content creator="initiator" name='video1'>
        <transport xmlns="urn:xmpp:jingle:transports:ice-udp:1"/>
        <description xmlns="urn:xmpp:jingle:apps:rtp:1" media="video">
            <category xmlns=']]>urn:xmpp:jingle:apps:category:0<![CDATA[' name='speaker'/>
            <payload-type id="31" name="H261" clockrate="9000"/>
        </description>
    </content>
    <content creator="initiator" name='video2'>
        <transport xmlns="urn:xmpp:jingle:transports:ice-udp:1"/>
        <description xmlns="urn:xmpp:jingle:apps:rtp:1" media="video">
            <category xmlns=']]>urn:xmpp:jingle:apps:category:0<![CDATA[' name='sl'/>
            <payload-type id="31" name="H261" clockrate="9000"/>
        </description>
    </content>
  </jingle>
</iq>
]]></example>
    </section1>
    <section1 topic="Requirements" anchor="reqs">
        <p>The motivations for this document are to:</p>
        <ul>
            <li>Allow entities to map <span class="ref"><link url="http://tools.ietf.org/html/rfc4796">RFC 4796</link></span> <note>RFC 4796: The Session Description Protocol (SDP) Content Attribute &lt;<link url="http://tools.ietf.org/html/rfc4796">http://tools.ietf.org/html/rfc4796</link>&gt;.</note> to Jingle when initiating or answering a session</li>
            <li>Allow applications to categorize Jingle contents medias and adapt their interface accordingly</li>
        </ul>
    </section1>
    <section1 topic="Security Considerations" anchor="security">
        <p>Related to the XEPs using this document.</p>
    </section1>
    <section1 topic="IANA Considerations" anchor="iana">
        <p>This document requires no interaction with the <span class="ref"><link url="http://www.iana.org/">Internet Assigned Numbers Authority (IANA)</link></span> <note>The Internet Assigned Numbers Authority (IANA) is the central coordinator for the assignment of unique parameter values for Internet protocols, such as port numbers and URI schemes. For further information, see &lt;<link url="http://www.iana.org/">http://www.iana.org/</link>&gt;.</note>.</p>
    </section1>
    <section1 topic="XMPP Registrar Considerations" anchor="registrar">
        <p>The <span class="ref"><link url="https://xmpp.org/registrar/">XMPP Registrar</link></span> <note>The XMPP Registrar maintains a list of reserved protocol namespaces as well as registries of parameters used in the context of XMPP extension protocols approved by the XMPP Standards Foundation. For further information, see &lt;<link url="https://xmpp.org/registrar/">https://xmpp.org/registrar/</link>&gt;.</note> is requested to issue an initial namespace of "urn:xmpp:jingle:apps:category:0".</p>
    </section1>
    <section1 topic="XML Schema" anchor="schema">
  <code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>

<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace=']]>urn:xmpp:jingle:apps:category:0<![CDATA['
    xmlns=']]>urn:xmpp:jingle:apps:category:0<![CDATA['
    elementFormDefault='qualified'>

  <xs:element name='category'>
    <xs:complexType>
      <xs:attribute name='name'>
        <xs:restriction base='xs:NCName'>
          <xs:enumeration value='slides'/>
          <xs:enumeration value='speaker'/>
          <xs:enumeration value='sl'/>
          <xs:enumeration value='main'/>
          <xs:enumeration value='alt'/>
        </xs:restriction>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
</xs:schema>
]]></code>
    </section1>
</xep>
