Skip to content

Commit 8bb9f9d

Browse files
authored
Update README.md
1 parent 50bfbb7 commit 8bb9f9d

File tree

1 file changed

+67
-59
lines changed

1 file changed

+67
-59
lines changed

README.md

Lines changed: 67 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -693,70 +693,78 @@ query.next((directCallLog) => {
693693

694694
| Method & Property| Description |
695695
|---|---|
696-
|next()| Used to query call history from `SendBirdCall` server. |
697-
|hasNext| If true, there is more call history to be retrieved.|
698-
|isLoading| If true, call history is being retrieved from SendBirdCall server. |
696+
|next()| Used to query call history from `SendBirdCall` server.|
697+
|hasNext| If **true**, there is more call history to be retrieved.|
698+
|isLoading| If **true**, call history is being retrieved from Sendbird Calls server. |
699699
|params.limit| Specifies the number of call logs to return at once. |
700-
|params.myRole| Returns call logs of the specified role. (e.g. if myRole is `'dc_callee'`, query will return only the callee’s call logs.) |
701-
|params.endResults| Returns the call logs for specified results. If more than one result is specified, they are processed as `OR` condition and all call logs corresponding with the specified end results will be returned. For example, if endResults is `['NO_ANSWER'`, `'CANCELED']`, only the `NO_ANSWER` and `CANCELED` call logs will be returned.|
702-
703-
## Sound Effect
704-
### Sound types
705-
| Type | Description |
706-
|--------------|---------------------------------------------------------------------------------------------------------------------------------------------------|
707-
| DIALING | Refers to a sound that is played on a caller’s side when the caller makes a call to a callee. |
708-
| RINGING | Refers to a sound that is played on a callee’s side when receiving a call. |
700+
|params.myRole| Returns call logs of the specified role. For example, if `myRole` is **dc_callee**, the query will return only the callee’s call logs.|
701+
|params.endResults| Returns the call logs for specified results. If more than one result is specified, they are processed as `OR` condition and all call logs corresponding with the specified end results will be returned. For example, if the `endResults` is set as **NO_ANSWER** or **CANCELED**, only the **NO_ANSWER** and **CANCELED** call logs will be returned.|
702+
703+
### Sound effect
704+
705+
#### - Sound types
706+
707+
| Type | Description|
708+
|---|---|
709+
| DIALING | Refers to a sound that is played on a caller’s side when the caller makes a call to a callee.|
710+
| RINGING | Refers to a sound that is played on a callee’s side when receiving a call.|
709711
| RECONNECTING | Refers to a sound that is played when a connection is lost, but immediately tries to reconnect. Users are also allowed to customize the ringtone. |
710-
| RECONNECTED | Refers to a sound that is played when a connection is re-established. |
711-
712-
### Add sound
713-
| Method | Description |
714-
|----------------------|---------------------------------------------------------------------------------------|
715-
| addDirectCallSound() | Adds a specific sound such as a ringtone and an alert tone with URL to a direct call. |
716-
##### Parameters
717-
| Parameter | Type | Description |
718-
|-----------|-----------|--------------------------------------------------------------------------------------------------------------------------------------|
719-
| type | SoundType | Specifies the sound type to be used according to the event. |
720-
| url | string | Specifies the URL of the sound file. You can use the URI of the asset on the server or ObjectURL created by `URL.createObjectURL()`. |
721-
722-
>Note: In modern web browsers, they have their own autoplay policies and can block the `addDirectCallSound()` method from being directly executed.
723-
To solve this problem, for Chrome and Firefox, the `addDirectCallSound()` method should be called after a user’s event such as clicking a button. For Safari, you have to call the `addDirectCallSound()` method in the event listener of a user’s event such as `onclick()` .
712+
| RECONNECTED | Refers to a sound that is played when a connection is re-established.|
713+
714+
#### - Add sound
715+
716+
|Method|Description|
717+
|---|---|
718+
|addDirectCallSound() | Adds a specific sound such as a ringtone and an alert tone with URL to a direct call. |
719+
720+
|Parameter|Type|Description|
721+
|---|---|---|
722+
|type |SoundType| Specifies the sound type to be used according to the event.|
723+
|url| string| Specifies the URL of the sound file. You can use the URI of the asset on the server or **ObjectURL** created by `URL.createObjectURL()`. |
724+
725+
>**Note**: In modern web browsers, they have their own autoplay policies and can block the `addDirectCallSound()` method from being directly executed. To solve this problem for `Chrome` and `Firefox`, the `addDirectCallSound()` method should be called after a user’s event such as clicking a button. For `Safari`, you have to call the `addDirectCallSound()` method in the event listener of a user’s event such as `onclick()`.
726+
724727
```javascript
725728
document.querySelector('#yourButton').addEventListener('click', function() {
726-
SendBirdCall.addDirectCallSound(SendBirdCall.SoundType.DIALING, RESOURCE_URL);
729+
SendBirdCall.addDirectCallSound(SendBirdCall.SoundType.DIALING, RESOURCE_URL);
727730
});
728731
```
729732

730-
### Remove sound
731-
| Method | Description |
732-
|----------------------------------------|----------------------------------------------|
733+
#### - Remove sound
734+
735+
| Method | Description|
736+
|---|---|
733737
| removeDirectCallSound(type: SoundType) | Removes a specific sound from a direct call. |
734-
##### Parameters
735-
| Parameter | Type | Description |
736-
|-----------|-----------|----------------------------------------------------------------|
737-
| type | SoundType | Specifies the type of sound to be used according to the event. |
738-
739-
## Additional information: call results
740-
Information relating the end result of a call can be obtained at any time via the `directCall.endResult` property, best accessed within the `onEnded()` callback.
741-
742-
743-
| EndResult | Description |
744-
|------------------|------------------------------------------------------------------------------------------------------------------------|
745-
|NO_ANSWER | The callee failed to either accept or decline the call within a specific amount of time.|
746-
|CANCELED | The caller canceled the call before the callee could accept or decline.|
747-
|DECLINED | The callee declined the call.|
748-
|COMPLETED | The call ended after either party ended it|
749-
|TIMED_OUT | The SendBird server failed to establish a media session between the caller and callee within a specific amount of time.|
750-
|CONNECTION_LOST | The data stream from either the caller or the callee has stopped due to a WebRTC connection issue.|
751-
|DIAL_FAILED | The dial() method call has failed. |
752-
|ACCEPT_FAILED | The accept() method call has failed.|
753-
|OTHER_DEVICE_ACCEPTED | The incoming call was accepted on a different device. This device received an incoming call notification, but the call ended when a different device accepted it.|
754-
755-
## Encoding Configurations
756-
757-
| Category | Value | Note |
758-
|--------------------|--------|--------------------------|
759-
| Frames per Second | 24 fps | |
760-
| Maximum Resolution | 720p | 1280x720 px; standard HD |
761-
| Audio Codec | OPUS | |
762-
| Video Codec | VP8 | |
738+
739+
| Parameter |Type|Description|
740+
|---|---|---|
741+
| type| SoundType| Specifies the type of sound to be used according to the event. |
742+
743+
<br />
744+
745+
## Appendix
746+
747+
### Call results
748+
749+
Information relating the end result of a call can be obtained at any time through the `directCall.endResult` property, best accessed within the `onEnded()` callback.
750+
751+
| EndResult | Description |
752+
|---|---|
753+
|NO_ANSWER|The callee failed to either accept or decline the call within a specific amount of time.|
754+
|CANCELED|The caller canceled the call before the callee could accept or decline.|
755+
|DECLINED|The callee declined the call.|
756+
|COMPLETED|The call ended after either party ended it|
757+
|TIMED_OUT|Sendbird Calls server failed to establish a media session between the caller and callee within a specific amount of time.|
758+
|CONNECTION_LOST|The data stream from either the caller or the callee has stopped due to a `WebRTC` connection issue.|
759+
|DIAL_FAILED|The `dial()` method call has failed.|
760+
|ACCEPT_FAILED|The `accept()` method call has failed.|
761+
|OTHER_DEVICE_ACCEPTED|The incoming call was accepted on a different device. This device received an incoming call notification, but the call ended when a different device accepted it.|
762+
763+
### Encoding configurations
764+
765+
|Category|Value| Note|
766+
|---|---|---|
767+
|Frames per Second | 24 fps ||
768+
|Maximum Resolution| 720p| 1280x720 px; standard HD |
769+
|Audio Codec| OPUS| |
770+
|Video Codec | VP8||

0 commit comments

Comments
 (0)