No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0272.xml 9.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Multiparty Jingle (Muji)</title>
  10. <abstract>
  11. This specification defines an XMPP protocol extension for initiating and
  12. managing multiparty voice and video conferences within an XMPP MUC
  13. </abstract>
  14. &LEGALNOTICE;
  15. <number>0272</number>
  16. <status>Deferred</status>
  17. <type>Standards Track</type>
  18. <sig>Standards</sig>
  19. <approver>Council</approver>
  20. <dependencies>
  21. <spec>XMPP Core</spec>
  22. <spec>XEP-0045</spec>
  23. <spec>XEP-0166</spec>
  24. </dependencies>
  25. <supersedes/>
  26. <supersededby/>
  27. <shortname>muji</shortname>
  28. <author>
  29. <firstname>Sjoerd</firstname>
  30. <surname>Simons</surname>
  31. <email>sjoerd.simons@collabora.co.uk</email>
  32. <jid>sjoerd.simons@collabora.co.uk</jid>
  33. </author>
  34. <author>
  35. <firstname>Dafydd</firstname>
  36. <surname>Harries</surname>
  37. <email>dafydd.harries@collabora.co.uk</email>
  38. <jid>dafydd.harries@collabora.co.uk</jid>
  39. </author>
  40. <revision>
  41. <version>0.1</version>
  42. <date>2009-09-11</date>
  43. <initials>psa</initials>
  44. <remark><p>Initial published version as accepted for publication by the XMPP Council.</p></remark>
  45. </revision>
  46. <revision>
  47. <version>0.0.0.2</version>
  48. <date>2009-06-09</date>
  49. <initials>sjoerd</initials>
  50. <remark><p>Second rough draft.</p></remark>
  51. </revision>
  52. </header>
  53. <section1 topic='Introduction' anchor='intro'>
  54. <p>
  55. &xep0166; is used to negotiate peer to peer media sessions.
  56. Muji (short for Multiparty Jingle) is a way to coordinate Jingle sessions
  57. between a group of people.
  58. Muji conferences are held in &xep0045; rooms.
  59. </p>
  60. </section1>
  61. <section1 topic="How it Works" anchor="howitworks">
  62. <p>
  63. A Muji conference has a number of contents, each of which has unique name,
  64. content type, and an encoding.
  65. Each participant may provide a stream for each content, and communicates
  66. which contents they are willing to provide streams for, along with encoding
  67. information, in their MUC presence.
  68. This serves two purposes. Firstly, so that each participant knows which
  69. contents every other participant provides.
  70. Secondly, so that there is a global payload type (PT) mapping for the
  71. various contents, so that clients only need to encode and payload each
  72. content that they provide once.
  73. </p>
  74. <p>
  75. Participants are not required to participate all the contents that are
  76. available.
  77. For example, a Muji client might choose to only request audio streams.
  78. </p>
  79. </section1>
  80. <section1 topic='Joining a Conference' anchor='joining'>
  81. <p>
  82. Joining a conference is done in two stages. The first step is to
  83. declare that preparations are being done to either join or start a muji
  84. session inside the MUC. This is indicated by the client sending a presence
  85. stanza to the MUC with a preparing element in muji section.
  86. </p>
  87. <code><![CDATA[
  88. <presence from='wiccarocks@shakespeare.lit/laptop'
  89. to='darkcave@chat.shakespeare.lit/oldhag'>
  90. <c xmlns="http://jabber.org/protocol/caps"
  91. node="http://telepathy.freedesktop.org/wiki/Muji"
  92. ver="48QdBuXRCJFb8qIzgy1FOHSGO0U="
  93. hash="sha-1" />
  94. <muji xmlns='http://telepathy.freedesktop.org/muji'>
  95. <preparing />
  96. </muji>
  97. </presence>
  98. ]]></code>
  99. <p>
  100. The client MUST then wait until the MUC rebroadcasts its presence message,
  101. after which it MUST wait for all other participants that had a preparing
  102. element in their presence to finish preparation. Afterwards it should finish
  103. it's own preparation by updating its presence with the contents it wants to
  104. take part in.
  105. </p>
  106. <code><![CDATA[
  107. <presence from='wiccarocks@shakespeare.lit/laptop'
  108. to='darkcave@chat.shakespeare.lit/oldhag'>
  109. <c xmlns="http://jabber.org/protocol/caps"
  110. node="http://telepathy.freedesktop.org/wiki/Muji"
  111. ver="48QdBuXRCJFb8qIzgy1FOHSGO0U="
  112. hash="sha-1" />
  113. <muji xmlns='http://telepathy.freedesktop.org/muji'>
  114. <content name='video'>
  115. <description xmlns='urn:xmpp:jingle:apps:rtp:0' media='video'>
  116. <payload-type id='97' name='theora' clockrate='90000'/>
  117. </description>
  118. </content>
  119. <content creator='initiator' name='voice'>
  120. <description xmlns='urn:xmpp:jingle:apps:rtp:0' media='audio'>
  121. <payload-type id='97' name='speex' clockrate='8000'/>
  122. <payload-type id='18' name='G729'/>
  123. </description>
  124. </content>
  125. </muji>
  126. </presence>
  127. ]]></code>
  128. <p>
  129. When a client adds a payload ID to a content description, it MUST have the
  130. same codec name and receiving parameters as the corresponding entries in
  131. other participants' payload maps for that content. For instance, if Alice
  132. defines a payload type with ID 98, codec Speex and a a clock rate of 8000
  133. for a content called “voice0”, then Bob must define payload type 98
  134. identically or not at all for that content.
  135. </p>
  136. <p>
  137. Furthermore, each content description MUST include at least one payload type
  138. that every other participant supports. In other words, the intersection of
  139. payload type mappings in descriptions for a content must not be the empty
  140. set. This avoids clients having to encode the same stream multiple times,
  141. which can be very costly, and also allows sending the encoded data only once
  142. where the transport makes this possible (e.g. IP multicast).
  143. </p>
  144. <p>
  145. Once a client has constructed content descriptions and advertised them in
  146. its MUC presence, it MUST initiate a Jingle session with every other
  147. participant. The requirement that it is the joining participant that
  148. initiates sessions avoids race conditions.
  149. </p>
  150. <p>
  151. Jingle sessions are initiated between the MUC JIDs of participants. That is,
  152. the Jingle session-initiate stanza is sent from one MUC JID to another. This
  153. allows participants to easily identify sessions as belonging to a Muji
  154. conference. Content names inside Muji-related Jingle sessions always refer
  155. to the content with the same name inside the Muji conference.
  156. </p>
  157. </section1>
  158. <section1 topic='Leaving a Conference' anchor='leaving'>
  159. <p>
  160. To leave a conference the Muji information MUST first be removed from the
  161. participant's presence; subsequently it SHOULD terminate all Jingle sessions
  162. related to that conference. Updating the presence first reduces the
  163. likelihood of situations where new participants initiate sessions with
  164. participants who are leaving the conference.
  165. </p>
  166. </section1>
  167. <section1 topic='Adding a Content Type' anchor='addcontent'>
  168. <p>
  169. Adding a stream follows a process similar to the joining a conference. As a
  170. first step an updated presence stanza MUST be send which contains a
  171. preparing element as part of the Muji section.
  172. </p>
  173. <code><![CDATA[
  174. <presence from='wiccarocks@shakespeare.lit/laptop'
  175. to='darkcave@chat.shakespeare.lit/oldhag'>
  176. <c xmlns="http://jabber.org/protocol/caps"
  177. node="http://telepathy.freedesktop.org/wiki/Muji"
  178. ver="48QdBuXRCJFb8qIzgy1FOHSGO0U="
  179. hash="sha-1" />
  180. <muji xmlns='http://telepathy.freedesktop.org/muji'>
  181. <content creator='initiator' name='voice'>
  182. <description xmlns='urn:xmpp:jingle:apps:rtp:0' media='audio'>
  183. <payload-type id='97' name='speex' clockrate='8000'/>
  184. <payload-type id='18' name='G729'/>
  185. </description>
  186. </content>
  187. <preparing/>
  188. </muji>
  189. </presence>
  190. ]]></code>
  191. <p>
  192. The client MUST then wait until the MUC rebroadcasts its presence message,
  193. after which it MUST wait for all other participants that had a preparing
  194. element in their presence to finish their changes.
  195. </p>
  196. <p>
  197. Afterwards the client should add the new content to the muji section of its
  198. presence and add the content to all the Jingle sessions it had with
  199. participants it shared the content with.
  200. </p>
  201. <code><![CDATA[
  202. <presence from='wiccarocks@shakespeare.lit/laptop'
  203. to='darkcave@chat.shakespeare.lit/oldhag'>
  204. <c xmlns="http://jabber.org/protocol/caps"
  205. node="http://telepathy.freedesktop.org/wiki/Muji"
  206. ver="48QdBuXRCJFb8qIzgy1FOHSGO0U="
  207. hash="sha-1" />
  208. <muji xmlns='http://telepathy.freedesktop.org/muji'>
  209. <content name='video'>
  210. <description xmlns='urn:xmpp:jingle:apps:rtp:0' media='video'>
  211. <payload-type id='97' name='theora' clockrate='90000'/>
  212. </description>
  213. </content>
  214. <content creator='initiator' name='voice'>
  215. <description xmlns='urn:xmpp:jingle:apps:rtp:0' media='audio'>
  216. <payload-type id='97' name='speex' clockrate='8000'/>
  217. <payload-type id='18' name='G729'/>
  218. </description>
  219. </content>
  220. </muji>
  221. </presence>
  222. ]]></code>
  223. </section1>
  224. <section1 topic='Removing a Content Type' anchor='removecontent'>
  225. <p>
  226. To remove a content type the participant SHOULD first sent an updated presence
  227. without the content in its muji section. Afterwards it MUST the content from
  228. all the Jingle sessions it has open.
  229. </p>
  230. </section1>
  231. <section1 topic='Relays and Mixers' anchor='relaysmixer'>
  232. <p>
  233. When scaling to conferences with a big number of participants
  234. it's no longer viable for all participants to have direct
  235. connections.
  236. On connections where upstream bandwidth is the limiting factor, an RTP
  237. relay which is able to relay the stream to multiple participants on
  238. the behalf of the clients and which forwards the streams of other
  239. participants back to the client can be used.
  240. If the limiting factor is either CPU or downstream bandwidth then a mixer
  241. can be used, which receives the media streams from other participants and
  242. mixes them on behalf of the client, so that the client only has to deal
  243. with receiving and decoding a single stream for each media type. On the
  244. sending side a mixer acts like a relay and relays the clients stream to all
  245. other participants.
  246. Both these services can either be provided by dedicated services or by
  247. other clients.
  248. </p>
  249. </section1>
  250. </xep>