ep_webrtc 0.1.100 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/index.js +4 -0
- package/package.json +2 -2
- package/static/js/index.js +1 -1
package/README.md
CHANGED
|
@@ -74,6 +74,20 @@ Supported values for `"disabled"`:
|
|
|
74
74
|
* `"soft"`: Initially disabled by default.
|
|
75
75
|
* `"hard"`: Unavailable (it cannot be enabled).
|
|
76
76
|
|
|
77
|
+
The camera's record resolution can be configured by setting `videoConstraints`
|
|
78
|
+
to any [video
|
|
79
|
+
constraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#parameters)
|
|
80
|
+
value acceptable to client browsers. It has the following default value:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
"ep_webrtc": {
|
|
84
|
+
"videoConstraints": {
|
|
85
|
+
"width": {"ideal": 160},
|
|
86
|
+
"height": {"ideal": 120}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
77
91
|
### Custom Activate Button
|
|
78
92
|
|
|
79
93
|
The misnamed `listenClass` setting allows you to specify a CSS selector for an
|
|
@@ -170,6 +184,9 @@ one or both of the following in your `settings.json`:
|
|
|
170
184
|
}
|
|
171
185
|
```
|
|
172
186
|
|
|
187
|
+
This only controls the size of the video display widget. To set the camera's
|
|
188
|
+
record resolution, see the `videoConstraints` setting.
|
|
189
|
+
|
|
173
190
|
## Metrics
|
|
174
191
|
|
|
175
192
|
You can see metrics for various errors that users have when attempting to
|
package/index.js
CHANGED
|
@@ -32,6 +32,10 @@ const settings = {
|
|
|
32
32
|
disabled: 'none',
|
|
33
33
|
sizes: {large: 260, small: 160},
|
|
34
34
|
},
|
|
35
|
+
videoConstraints: {
|
|
36
|
+
width: {ideal: 160},
|
|
37
|
+
height: {ideal: 120},
|
|
38
|
+
},
|
|
35
39
|
iceServers: [{urls: ['stun:stun.l.google.com:19302']}],
|
|
36
40
|
listenClass: null,
|
|
37
41
|
moreInfoUrl: {},
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "git@github.com:ether/ep_webrtc.git",
|
|
6
6
|
"type": "git"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "1.0.0",
|
|
9
9
|
"description": "WebRTC based audio/video chat to Etherpad",
|
|
10
10
|
"author": "John McLear <john@mclear.co.uk>",
|
|
11
11
|
"contributors": [],
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"eslint": "^8.10.0",
|
|
22
22
|
"eslint-config-etherpad": "^3.0.4",
|
|
23
|
-
"typescript": "^4.
|
|
23
|
+
"typescript": "^4.6.2"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"lint": "eslint .",
|
package/static/js/index.js
CHANGED
|
@@ -669,7 +669,7 @@ exports.rtc = new class {
|
|
|
669
669
|
debug(`requesting permission to access ${devices.join(' and ')}`);
|
|
670
670
|
const stream = await window.navigator.mediaDevices.getUserMedia({
|
|
671
671
|
audio: addAudioTrack,
|
|
672
|
-
video: addVideoTrack &&
|
|
672
|
+
video: addVideoTrack && this._settings.videoConstraints,
|
|
673
673
|
});
|
|
674
674
|
debug('successfully accessed device(s)');
|
|
675
675
|
return stream;
|