このページは現在英語版のみで提供されており、日本語版も近日中に提供される予定です。ご利用いただきありがとうございます。

着信音のカスタマイズ

This article introduces how to use the custom ringtone and silent incoming call ringtone feature from the definition.

Setting incoming call ringtone

Only local MP3 format file addresses can be used, ensuring that the file is accessible.
To reset the ringtone, pass in an empty string for filePath.
Use the ES6 import method to import the ringtone file.
Note:
v3.0.0+ supported.
import filePath from '../public/ring.mp3';

try {
await TUICallKitServer.setCallingBell(filePath?: string);
} catch (error: any) {
alert(`[TUICallKit] setCallingBell API failed. Reason: ${error}`);
}

Silent incoming call ringtone

Enable/Disable incoming call ringtone.
After enabling, the incoming call ringtone will not be played when a call request is received.
Note:
v3.1.2+ supported.
try {
await TUICallKitServer.enableMuteMode(enable: boolean);
} catch (error: any) {
alert(`[TUICallKit] enableMuteMode API failed. Reason: ${error}`);
}