Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 8953ff5

Browse files
authored
Merge branch 'master' into eslint-cleanup
2 parents 56fa107 + 6d6d0a4 commit 8953ff5

33 files changed

+848
-365
lines changed

docs/jsdoc/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"recurseDepth": 10,
44
"source": {
55
"include": "src/sdk",
6-
"exclude": ["src/sdk/rest", "src/sdk/nuve", "src/sdk/ui"],
6+
"exclude": ["src/sdk/rest", "src/sdk/ui"],
77
"excludePattern": "w*.legacy.*"
88
},
99
"sourceType": "module",
@@ -17,7 +17,7 @@
1717
"dateFormat": "ddd MMM Do YYYY",
1818
"outputSourceFiles": false,
1919
"outputSourcePath": false,
20-
"systemName": "Intel® Collaboration Suite for WebRTC version 4.2.1",
20+
"systemName": "Intel® Collaboration Suite for WebRTC version 4.3",
2121
"footer": "",
2222
"copyright": "Copyright © 2019 Intel Corporation. All Rights Reserved.",
2323
"navType": "vertical",

docs/mdfiles/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
Change Log
22
==========
3+
# 4.3
4+
* The type of `conferenceClient.publish` method's option is changed from `AudioEncodingParameters` and `VideoEncodingParameters` to `RTCRtpSendParameters`.
5+
* `audio` and `video` of `PublicationSettings` is changed from `AudioPublicationSettings` and `VideoPublicationSettings` to `AudioPublicationSettings` array and `VideoPublicationSettings` array.
6+
* Add `rid` to `VideoSubscriptionConstraints`. When `rid` is specified, other constraints will be ignored.
7+
38
# 4.0.2
49
* Fix a compatibility issue for Chrome 69 beta.
510

docs/mdfiles/index.md

Lines changed: 88 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ Conference Mode:
1818

1919
| | Windows* | Ubuntu* | macOS* |
2020
| ------------------------------- | -------- | ------- |------- |
21-
| Chrome* 73 ||||
22-
| Firefox* 66 ||||
23-
| Safari* 12 | | ||
24-
| Microsoft Edge* 44.17763.1.0 || | | |
21+
| Chrome* 78 ||||
22+
| Firefox* 70 ||||
23+
| Safari* 13 | | ||
24+
| Microsoft Edge* 44.18362.387.0 || | | |
2525

2626
*Table 1: Browser requirements for Conference Mode*
2727

@@ -30,9 +30,9 @@ P2P Mode:
3030

3131
| | Windows* | Ubuntu* | macOS* |
3232
| ------------------------------- | -------- | ------- |------- |
33-
| Chrome* 73 ||||
34-
| Firefox* 66 ||||
35-
| Safari* 12 | | ||
33+
| Chrome* 78 ||||
34+
| Firefox* 70 ||||
35+
| Safari* 13 | | ||
3636

3737
*Table 2: Browser requirements for P2P Mode*
3838

@@ -68,11 +68,89 @@ Signaling channel is an implementation to transmit signaling data for creating a
6868

6969
In the customized signaling channel, you need to implement `connect`, `disconnect` and `send`, invoke `onMessage` when a new message arrives, and invoke `onServerDisconnected` when the connection is lost. Then include your customized `sc.*.js` into the HTML page.
7070

71-
# 5 Events
71+
# 5 Conference mode
7272

73-
The JavaScript objects fires events using `Ics.Base.EventDispatchers`. For more detailed events, please refer to the specific class description page.
73+
Conference mode is designed for applications with multiple participants through MCU conference server. To enable conference chat, copy and paste the following code into the head section of your HTML document:
74+
~~~~~~{.js}
75+
<script type="text/javascript" src="socket.io.js"></script>
76+
<script type="text/javascript" src="adapter.js"></script>
77+
<script type="text/javascript" src="owt.js"></script>
78+
~~~~~~
79+
80+
The JavaScript SDK includes a demo application for whole conferencing workflow with operations including join room, publish and subscribe streams, etc. Moreover, the conference server also supports simulcast. This can be enabled through JavaScript SDK.
81+
82+
## 5.1 Publish a simulcast stream
83+
~~~~~~{.js}
84+
// Example of simulcast publication.
85+
conference = new Owt.Conference.ConferenceClient();
86+
// ...
87+
conference.join(token).then(resp => {
88+
// ...
89+
Owt.Base.MediaStreamFactory.createMediaStream(new Owt.Base.StreamConstraints(
90+
audioConstraints, videoConstraints)).then(stream => {
91+
/*
92+
* Use `RTCRtpEncodingParameters` as publish option
93+
* (https://w3c.github.io/webrtc-pc/#dom-rtcrtpencodingparameters).
94+
* The following option would create 3 streams with resolutions if browser supports:
95+
* OriginResolution, OriginResolution/2.0 and OriginResolution/4.0.
96+
* For current Firefox, the resolutions should be sorted in descending order(reversed sample's option).
97+
* For current Safari, legacy simulcast is used and the parameters like `rid` won't take effect.
98+
* Besides `scaleResolutionDownBy`, other `RTCRtpEncodingParameters` can be set
99+
* if browser supports.
100+
* The actual output will be determined by browsers, the outcome may not be exactly same
101+
* as what is set in publishOption, e.g. For a vga video stream, there may be 2 RTP streams
102+
* rather than 3.
103+
*/
104+
const publishOption = {video:[
105+
{rid: 'q', active: true, scaleResolutionDownBy: 4.0},
106+
{rid: 'h', active: true, scaleResolutionDownBy: 2.0},
107+
{rid: 'f', active: true, scaleResolutionDownBy: 1.0}
108+
]};
109+
/*
110+
* Codec priority list.
111+
* Here 'vp8' will be used if enabled.
112+
*/
113+
const codecs = ['vp8', 'h264'];
114+
localStream = new Owt.Base.LocalStream(
115+
stream, new Owt.Base.StreamSourceInfo(
116+
'mic', 'camera'));
117+
conference.publish(localStream, publishOption, codecs).then(publication => {
118+
// ...
119+
});
120+
});
121+
~~~~~~
122+
123+
## 5.2 Subscribe a simulcast stream
124+
~~~~~~{.js}
125+
// Example of subscription.
126+
conference = new Owt.Conference.ConferenceClient();
127+
// ...
128+
conference.join(token).then(resp => {
129+
// ...
130+
/*
131+
* Subscribe simulcast stream with specified `rid`
132+
* which can be found in `RemoteStream.settings.video[i].rid`.
133+
* If `rid` is set when subscribing, other parameters will be ignored.
134+
*/
135+
const subscribeOption = {
136+
audio: true,
137+
video: {rid: 'q'}
138+
};
139+
conference.subscribe(remoteStream, subscribeOption).then((subscription) => {
140+
// ...
141+
});
142+
~~~~~~
143+
144+
**Note**:
145+
a. The simulcast stream published to conference won't be transcoded.
146+
b. The `rid` attribute may not be present once a 'streamadded' event triggered. Users should listen on stream's `updated` event for new `rid` added.
147+
c. Current browsers support VP8 simulcast well while H.264 simulcast has some limitations.
148+
149+
# 6 Events
150+
151+
The JavaScript objects fires events using `Owt.Base.EventDispatchers`. For more detailed events, please refer to the specific class description page.
74152

75-
# 6 Privacy and security
153+
# 7 Privacy and security
76154
SDK will send operation system's name and version, browser name, version and abilities, SDK name and version to conference server and P2P endpoints it tries to make connection. SDK does not store this information on disk.
77155

78156
**Note:** \* Other names and brands may be claimed as the property of others.

0 commit comments

Comments
 (0)