Skip to content
This repository was archived by the owner on Feb 10, 2022. It is now read-only.

Commit 4cbaf0d

Browse files
authored
Release quickstart sample 1.3.0 (#10)
* Updated SDK version to 1.3.0. * Added sound effect. * Changed some strings.
1 parent 005a212 commit 4cbaf0d

19 files changed

+61
-46
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,26 @@ $ npm run start
9090

9191
<br />
9292

93+
##Sound Effects
94+
You can use different sound effects to enhance the user experience for events that take place while using Sendbird Calls.
95+
96+
To add sound effects, use the `SendBirdCall.addDirectCallSound(type: SoundType, uri: string)` method for the following events: dialing, ringing, reconnecting, and reconnected. Remember to set sound effects before the mentioned events occur. To remove sound effects, use the `SendBirdCall.Options.removeDirectCallSound(type: SoundType)` method.
97+
98+
Use `SendBirdCall.addDirectCallSound(type: SoundType, uri: string)` method to set sound effects for a number of types: dialing, ringing, reconnecting, reconnected. Sound effects must be set before the events occur. To unregister a sound effect, remove it by calling `SendBirdCall.Options.removeDirectCallSound(type: SoundType)`.
99+
100+
```javascript
101+
// Play on a caller’s side when making a call.
102+
SendBirdCall.addDirectCallSound(SendBirdCall.SoundType.DIALING, DIALING_SOUND_URL);
103+
// Play on a callee’s side when receiving a call.
104+
SendBirdCall.addDirectCallSound(SendBirdCall.SoundType.RINGING, RINGING_SOUND_URL);
105+
// Play when a connection is lost, but the SDK immediately attempts to reconnect.
106+
SendBirdCall.addDirectCallSound(SendBirdCall.SoundType.RECONNECTING, RECONNECTING_SOUND_URL);
107+
// Play when the connection is re-established.
108+
SendBirdCall.addDirectCallSound(SendBirdCall.SoundType.RECONNECTED, RECONNECTED_SOUND_URL);
109+
```
110+
For more information about sound effects, see the [SDK for JavaScript README for Sound effects](https://github.com/sendbird/sendbird-calls-javascript#sound-effect)
111+
112+
93113
## Reference
94114

95115
For further detail on Sendbird Calls for JavaScript, refer to [Sendbird Calls SDK for JavaScript README](https://github.com/sendbird/sendbird-calls-javascript/blob/master/README.md).

css/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ body {
106106
}
107107

108108
.title-choice-type {
109-
width: 174px;
109+
width: 185px;
110110
height: 20px;
111111
letter-spacing: -0.1px;
112112
color: var(--navy-600);

lib/assets/Dialing.mp3

176 KB
Binary file not shown.

lib/assets/Reconnected.mp3

93 KB
Binary file not shown.

lib/assets/Reconnecting.mp3

99.1 KB
Binary file not shown.

lib/assets/Ringing.mp3

245 KB
Binary file not shown.

lib/components/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default class Header extends BaseElement {
1212

1313
this.settingItems = [
1414
{
15-
'label': 'Device settings',
15+
'label': 'Device Settings',
1616
'callback': () => { this.sendToParent('show_settings') }
1717
},
1818
{

lib/components/TabToolBar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default class TabToolBar extends BaseElement {
1515
}
1616
const btnDial = createDiv({ id: 'btn_tab_dial', className: `${classes['btnTab']}` });
1717
const icoTabDial = createDiv({id: 'ico_tab_dial', className: `${classes['tabIco']} ${classes['dialActive']}`});
18-
const btnDialCaption = createParagraph({id: 'btn_dial_caption', innerText: 'Dial', className: `${classes['fontSmall']} ${classes['fontHeavy']} ${classes['btnTabCaption']} ${classes['btnTabActive']}`});
18+
const btnDialCaption = createParagraph({id: 'btn_dial_caption', innerText: 'Call', className: `${classes['fontSmall']} ${classes['fontHeavy']} ${classes['btnTabCaption']} ${classes['btnTabActive']}`});
1919

2020
btnDial.appendChild(icoTabDial);
2121
btnDial.appendChild(btnDialCaption);
@@ -37,7 +37,7 @@ export default class TabToolBar extends BaseElement {
3737

3838
const btnCallLog = createDiv({id: 'btn_tab_calllog', className: `${classes['btnTab']}`});
3939
const icoCallLog = createDiv({id: 'ico_tab_callog', className: `${classes['tabIco']} ${classes['callLogDeactive']}`});
40-
const btnCalllogCaption = createParagraph({id: 'btn_calllog_caption', innerText: 'History', className: `${classes['fontSmall']} ${classes['fontHeavy']} ${classes['btnTabCaption']} ${classes['btnTabDeactive']}`});
40+
const btnCalllogCaption = createParagraph({id: 'btn_calllog_caption', innerText: 'Recents', className: `${classes['fontSmall']} ${classes['fontHeavy']} ${classes['btnTabCaption']} ${classes['btnTabDeactive']}`});
4141

4242
btnCallLog.appendChild(icoCallLog);
4343
btnCallLog.appendChild(btnCalllogCaption);

lib/css/styles.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ const styles = {
608608
},
609609

610610
dialTitle: {
611-
marginBottom: '16px'
611+
marginBottom: '32px'
612612
},
613613

614614
/*** buttons ***/
@@ -1273,15 +1273,6 @@ const styles = {
12731273
backgroundPosition: 'center'
12741274
},
12751275

1276-
dialDesc: {
1277-
width: '312px',
1278-
height: '40px',
1279-
textAlign: 'center',
1280-
color: colors.navy400,
1281-
marginBottom: '32px',
1282-
letterSpacing: '-0.1px'
1283-
},
1284-
12851276
btnVideo: {
12861277
backgroundImage: `url(${videoPurpleIcon})`,
12871278
backgroundRepeat: 'no-repeat',

lib/views/AppInfoView.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import SendBirdCall from "sendbird-calls";
21
import BaseElement from "../components/BaseElement";
32
import { classes } from "../css/styles";
4-
import { createDiv, createLabel, createOption, createSelect } from "../utils/domUtil";
3+
import { createDiv, createLabel } from "../utils/domUtil";
54

65
export default class AppInfoView extends BaseElement {
76
constructor({ args }) {
@@ -55,7 +54,7 @@ export default class AppInfoView extends BaseElement {
5554
const applicationInfoContainer = createDiv({ id: 'select_container', className: classes['selectContainer'] });
5655
const applicationNameLabel = createLabel({
5756
id: 'app_name_label',
58-
innerText: 'Application name',
57+
innerText: 'Name',
5958
className: `${classes['popupItemLabel']} ${classes['fontSmall']} ${classes['fontHeavy']}`
6059
});
6160
const applicationName = createLabel({
@@ -69,7 +68,7 @@ export default class AppInfoView extends BaseElement {
6968

7069
const applicationIDLabel = createLabel({
7170
id: 'app_id_label',
72-
innerText: 'Application ID',
71+
innerText: 'ID',
7372
className: `${classes['popupItemLabel']} ${classes['fontSmall']} ${classes['fontHeavy']}`
7473
});
7574

0 commit comments

Comments
 (0)