mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 21:36:29 +03:00
tweak examples
This commit is contained in:
@@ -3291,9 +3291,11 @@ char* dc_msg_get_videochat_url (const dc_msg_t* msg);
|
||||
|
||||
|
||||
/**
|
||||
* Check if the videochat can be handled internally.
|
||||
* If "basic webrtc" as of https://github.com/cracker0dks/basicwebrtc is used to initiate the videochat,
|
||||
* this is returned by dc_msg_is_basic_videochat().
|
||||
* Check if the videochat is a "basic webrtc" videochat.
|
||||
*
|
||||
* Calling this functions only makes sense for messages of type #DC_MSG_VIDEOCHAT_INVITATION,
|
||||
* in this case, if "basic webrtc" as of https://github.com/cracker0dks/basicwebrtc was used to initiate the videochat,
|
||||
* dc_msg_is_basic_videochat() returns true.
|
||||
* "basic webrtc" videochat may be processed natively by the app
|
||||
* whereas for other urls just the browser is opened.
|
||||
*
|
||||
@@ -3301,8 +3303,21 @@ char* dc_msg_get_videochat_url (const dc_msg_t* msg);
|
||||
* To check if a message is a videochat invitation at all, check the message type for #DC_MSG_VIDEOCHAT_INVITATION.
|
||||
*
|
||||
* @param msg The message object.
|
||||
* @return 0=message is no videochat invitation or cannot be handled internally
|
||||
* 1=message is a videochat invitation that can be handled internally or by a supported browser.
|
||||
* @return 0=message is no "basic webrtc" videochat invitation
|
||||
* 1=message is a "basic webrtc" videochat invitation.
|
||||
*
|
||||
* Example:
|
||||
* ~~~
|
||||
* if (dc_msg_get_viewtype(msg) == DC_MSG_VIDEOCHAT_INVITATION) {
|
||||
* if (dc_msg_is_basic_videochat(msg)) {
|
||||
* // videochat invitation that we ship a client for
|
||||
* } else {
|
||||
* // use browser for videochat, just open the url
|
||||
* }
|
||||
* } else {
|
||||
* // not a videochat invitation
|
||||
* }
|
||||
* ~~~
|
||||
*/
|
||||
int dc_msg_is_basic_videochat (const dc_msg_t* msg);
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ X-Mailer: Delta Chat Core 1.40.0/CLI
|
||||
Chat-Version: 1.0
|
||||
Chat-Content: videochat-invitation
|
||||
Chat-Videochat-Url: https://example.org/p2p/?roomname=6HiduoAn4xN
|
||||
To: <tunis3@example>
|
||||
To: <tunis3@example.org>
|
||||
From: "=?utf-8?q??=" <tunis4@example.org>
|
||||
|
||||
You are invited to an videochat, click https://example.org/p2p/?roomname=6HiduoAn4xN to join.
|
||||
|
||||
Reference in New Issue
Block a user