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