|
@@ -9,54 +9,56 @@ To embed Jitsi Meet in your application you need to add the Jitsi Meet API libra
|
9
|
9
|
```javascript
|
10
|
10
|
<script src="https://meet.jit.si/external_api.js"></script>
|
11
|
11
|
```
|
12
|
|
-
|
13
|
12
|
## API
|
14
|
13
|
|
15
|
|
-### `api = new JitsiMeetExternalAPI(domain, room, [width], [height], [htmlElement], [configOverwite], [interfaceConfigOverwrite], [noSsl], [jwt])`
|
|
14
|
+### `api = new JitsiMeetExternalAPI(domain, options)`
|
16
|
15
|
|
17
|
16
|
The next step for embedding Jitsi Meet is to create the Jitsi Meet API object.
|
18
|
17
|
Its constructor gets a number of options:
|
19
|
18
|
|
20
|
19
|
* **domain**: domain used to build the conference URL, "meet.jit.si" for
|
21
|
20
|
example.
|
22
|
|
-* **room**: name of the room to join.
|
23
|
|
-* **width**: (optional) width for the iframe which will be created.
|
24
|
|
-* **height**: (optional) height for the iframe which will be created.
|
25
|
|
-* **htmlElement**: (optional) HTL DOM Element where the iframe will be added as
|
26
|
|
- a child.
|
27
|
|
-* **configOverwite**: (optional) JS object with overrides for options defined in
|
28
|
|
- [config.js].
|
29
|
|
-* **interfaceConfigOverwrite**: (optional) JS object with overrides for options
|
30
|
|
- defined in [interface_config.js].
|
31
|
|
-* **noSsl**: (optional, defaults to true) Boolean indicating if the server
|
32
|
|
- should be contacted using HTTP or HTTPS.
|
33
|
|
-* **jwt**: (optional) [JWT](https://jwt.io/) token.
|
|
21
|
+* **options**: object with properties - the optional arguments:
|
|
22
|
+ * **room**: (optional) name of the room to join.
|
|
23
|
+ * **width**: (optional) width for the iframe which will be created.
|
|
24
|
+ * **height**: (optional) height for the iframe which will be created.
|
|
25
|
+ * **htmlElement**: (optional) HTL DOM Element where the iframe will be added as a child.
|
|
26
|
+ * **configOverwite**: (optional) JS object with overrides for options defined in [config.js].
|
|
27
|
+ * **interfaceConfigOverwrite**: (optional) JS object with overrides for options defined in [interface_config.js].
|
|
28
|
+ * **noSsl**: (optional, defaults to true) Boolean indicating if the server should be contacted using HTTP or HTTPS.
|
|
29
|
+ * **jwt**: (optional) [JWT](https://jwt.io/) token.
|
34
|
30
|
|
35
|
31
|
Example:
|
36
|
32
|
|
37
|
33
|
```javascript
|
38
|
|
-var domain = "meet.jit.si";
|
39
|
|
-var room = "JitsiMeetAPIExample";
|
40
|
|
-var width = 700;
|
41
|
|
-var height = 700;
|
42
|
|
-var htmlElement = document.querySelector('#meet');
|
43
|
|
-var api = new JitsiMeetExternalAPI(domain, room, width, height, htmlElement);
|
|
34
|
+var options = {
|
|
35
|
+ domain: "meet.jit.si",
|
|
36
|
+ room: "JitsiMeetAPIExample",
|
|
37
|
+ width: 700,
|
|
38
|
+ height: 700,
|
|
39
|
+ htmlElement: document.querySelector('#meet')
|
|
40
|
+}
|
|
41
|
+var api = new JitsiMeetExternalAPI(domain, options);
|
44
|
42
|
```
|
45
|
43
|
|
46
|
44
|
You can overwrite options set in [config.js] and [interface_config.js].
|
47
|
45
|
For example, to enable the filmstrip-only interface mode, you can use:
|
48
|
46
|
|
49
|
47
|
```javascript
|
50
|
|
-var interfaceConfigOverwrite = {filmStripOnly: true};
|
51
|
|
-var api = new JitsiMeetExternalAPI(domain, room, width, height, undefined, undefined, interfaceConfigOverwrite);
|
|
48
|
+var options = {
|
|
49
|
+ interfaceConfigOverwrite: {filmStripOnly: true}
|
|
50
|
+};
|
|
51
|
+var api = new JitsiMeetExternalAPI(domain, options);
|
52
|
52
|
```
|
53
|
53
|
|
54
|
54
|
You can also pass a jwt token to Jitsi Meet:
|
55
|
55
|
|
56
|
56
|
```javascript
|
57
|
|
-var jwt = "<jwt_token>";
|
58
|
|
-var noSsl = false;
|
59
|
|
-var api = new JitsiMeetExternalAPI(domain, room, width, height, htmlElement, configOverwrite, interfaceConfigOverwrite, noSsl, jwt);
|
|
57
|
+var options = {
|
|
58
|
+ jwt: "<jwt_token>",
|
|
59
|
+ noSsl: false
|
|
60
|
+};
|
|
61
|
+var api = new JitsiMeetExternalAPI(domain, options);
|
60
|
62
|
```
|
61
|
63
|
|
62
|
64
|
### Controlling the embedded Jitsi Meet Conference
|