forked from jitsi/jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
external_api: add ability to send a text message through datachannels
- Loading branch information
Showing
5 changed files
with
71 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,6 +270,11 @@ api.executeCommand('email', '[email protected]'); | |
api.executeCommand('avatarUrl', 'https://avatars0.githubusercontent.com/u/3671647'); | ||
``` | ||
|
||
* **sendEndpointTextMessage** - Sends a text message to another participant through the datachannels. | ||
```javascript | ||
api.executeCommand('receiverParticipantId', 'text'); | ||
``` | ||
|
||
You can also execute multiple commands using the `executeCommands` method: | ||
```javascript | ||
api.executeCommands(commands); | ||
|
@@ -323,6 +328,21 @@ changes. The listener will receive an object with the following structure: | |
} | ||
``` | ||
|
||
* **endpointTextMessageReceived** - event notifications about a text message received through datachannels. | ||
The listener will receive an object with the following structure: | ||
```javascript | ||
{ | ||
senderInfo: { | ||
jid: string, // the jid of the sender | ||
id: string // the participant id of the sender | ||
}, | ||
eventData: { | ||
name: string // the name of the datachannel event: `endpoint-text-message` | ||
text: string // the received text from the sender | ||
} | ||
} | ||
``` | ||
|
||
* **micError** - event notifications about Jitsi-Meet having failed to access the mic. The listener will receive an object with the following structure: | ||
```javascript | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters