すべてのプロダクト
Search
ドキュメントセンター

SuperApp:オーディオ

最終更新日:Jan 18, 2025

このトピックでは、WVAudio の JavaScript API について説明します。 HTML5 アプリまたはミニアプリを作成する際に、このトピックを参照できます。 WVAudio の JavaScript API を使用して、指定されたシステムサウンドを再生できます。

WVAudio.playSystemSound

説明

この API は、WindVane iOS でのみ使用できます。

指定されたシステムサウンドを再生します。

入力パラメーター

  • [int] sound: 再生するシステムサウンドの ID。 iOS のシステムサウンドの ID の詳細については、

  • [int] count: サウンドを連続して再生する回数。

コールバックパラメーター

コールバックパラメーターはありません。サウンドが再生されると、success コールバックが呼び出されます。それ以外の場合は、failure コールバックが呼び出されます。

var params = {
        // 再生するシステムサウンドの ID
        sound: 1000,
        // サウンドを連続して再生する回数
        count: 3
};
window.WindVane.call('WVAudio', 'playSystemSound', params, function(e) {
        alert('success');
}, function(e) {
        alert('failure: ' + JSON.stringify(e));
});

システムサウンド ID の表を以下に示します。

サウンド ID

ファイル名 (iPhone)

ファイル名 (iPod Touch)

カテゴリ

備考

1000

new-mail.caf

new-mail.caf

MailReceived

1001

mail-sent.caf

mail-sent.caf

MailSent

1002

Voicemail.caf

Voicemail.caf

VoicemailReceived

1003

ReceivedMessage.caf

ReceivedMessage.caf

SMSReceived

1004

SentMessage.caf

SentMessage.caf

SMSSent

1005

alarm.caf

sq_alarm.caf

CalendarAlert

1006

low_power.caf

low_power.caf

LowPower

1007

sms-received1.caf

sms-received1.caf

SMSReceived_Alert

1008

sms-received2.caf

sms-received2.caf

SMSReceived_Alert

1009

sms-received3.caf

sms-received3.caf

SMSReceived_Alert

1010

sms-received4.caf

sms-received4.caf

SMSReceived_Alert

1011

-

-

SMSReceived_Vibrate

1012

sms-received1.caf

sms-received1.caf

SMSReceived_Alert

1013

sms-received5.caf

sms-received5.caf

SMSReceived_Alert

1014

sms-received6.caf

sms-received6.caf

SMSReceived_Alert

1015

Voicemail.caf

Voicemail.caf

-

2.1 以降で使用可能

1016

tweet_sent.caf

tweet_sent.caf

SMSSent

5.0 以降で使用可能

1020

Anticipate.caf

Anticipate.caf

SMSReceived_Alert

4.2 以降で使用可能

1021

Bloom.caf

Bloom.caf

SMSReceived_Alert

4.2 以降で使用可能

1022

Calypso.caf

Calypso.caf

SMSReceived_Alert

4.2 以降で使用可能

1023

Choo_Choo.caf

Choo_Choo.caf

SMSReceived_Alert

4.2 以降で使用可能

1024

Descent.caf

Descent.caf

SMSReceived_Alert

4.2 以降で使用可能

1025

Fanfare.caf

Fanfare.caf

SMSReceived_Alert

4.2 以降で使用可能

1026

Ladder.caf

Ladder.caf

SMSReceived_Alert

4.2 以降で使用可能

1027

Minuet.caf

Minuet.caf

SMSReceived_Alert

4.2 以降で使用可能

1028

News_Flash.caf

News_Flash.caf

SMSReceived_Alert

4.2 以降で使用可能

1029

Noir.caf

Noir.caf

SMSReceived_Alert

4.2 以降で使用可能

1030

Sherwood_Forest.caf

Sherwood_Forest.caf

SMSReceived_Alert

4.2 以降で使用可能

1031

Spell.caf

Spell.caf

SMSReceived_Alert

4.2 以降で使用可能

1032

Suspense.caf

Suspense.caf

SMSReceived_Alert

4.2 以降で使用可能

1033

Telegraph.caf

Telegraph.caf

SMSReceived_Alert

4.2 以降で使用可能

1034

Tiptoes.caf

Tiptoes.caf

SMSReceived_Alert

4.2 以降で使用可能

1035

Typewriters.caf

Typewriters.caf

SMSReceived_Alert

4.2 以降で使用可能

1036

Update.caf

Update.caf

SMSReceived_Alert

4.2 以降で使用可能

1050

ussd.caf

ussd.caf

USSDAlert

1051

SIMToolkitCallDropped.caf

SIMToolkitCallDropped.caf

SIMToolkitTone

1052

SIMToolkitGeneralBeep.caf

SIMToolkitGeneralBeep.caf

SIMToolkitTone

1053

SIMToolkitNegativeACK.caf

SIMToolkitNegativeACK.caf

SIMToolkitTone

1054

SIMToolkitPositiveACK.caf

SIMToolkitPositiveACK.caf

SIMToolkitTone

1055

SIMToolkitSMS.caf

SIMToolkitSMS.caf

SIMToolkitTone

1057

Tink.caf

Tink.caf

PINKeyPressed

1070

ct-busy.caf

ct-busy.caf

AudioToneBusy

4.0 より前はこのサウンドのカテゴリはありませんでした。

1071

ct-congestion.caf

ct-congestion.caf

AudioToneCongestion

4.0 より前はこのサウンドのカテゴリはありませんでした。

1072

ct-path-ack.caf

ct-path-ack.caf

AudioTonePathAcknowledge

4.0 より前はこのサウンドのカテゴリはありませんでした。

1073

ct-error.caf

ct-error.caf

AudioToneError

4.0 より前はこのサウンドのカテゴリはありませんでした。

1074

ct-call-waiting.caf

ct-call-waiting.caf

AudioToneCallWaiting

4.0 より前はこのサウンドのカテゴリはありませんでした。

1075

ct-keytone2.caf

ct-keytone2.caf

AudioToneKey2

4.0 より前はこのサウンドのカテゴリはありませんでした。

1100

lock.caf

sq_lock.caf

ScreenLocked

1101

unlock.caf

sq_lock.caf

ScreenUnlocked

1102

-

-

FailedUnlock

1103

Tink.caf

sq_tock.caf

KeyPressed

1104

Tock.caf

sq_tock.caf

KeyPressed

1105

Tock.caf

sq_tock.caf

KeyPressed

1106

beep-beep.caf

sq_beep-beep.caf

ConnectedToPower

1107

RingerChanged.caf

RingerChanged.caf

RingerSwitchIndication

1108

photoShutter.caf

photoShutter.caf

CameraShutter

1109

shake.caf

shake.caf

ShakeToShuffle

3.0 以降で使用可能

1110

jbl_begin.caf

jbl_begin.caf

JBL_Begin

3.0 以降で使用可能

1111

jbl_confirm.caf

jbl_confirm.caf

JBL_Confirm

3.0 以降で使用可能

1112

jbl_cancel.caf

jbl_cancel.caf

JBL_Cancel

3.0 以降で使用可能

1113

begin_record.caf

begin_record.caf

BeginRecording

3.0 以降で使用可能

1114

end_record.caf

end_record.caf

EndRecording

3.0 以降で使用可能

1115

jbl_ambiguous.caf

jbl_ambiguous.caf

JBL_Ambiguous

3.0 以降で使用可能

1116

jbl_no_match.caf

jbl_no_match.caf

JBL_NoMatch

3.0 以降で使用可能

1117

begin_video_record.caf

begin_video_record.caf

BeginVideoRecording

3.0 以降で使用可能

1118

end_video_record.caf

end_video_record.caf

EndVideoRecording

3.0 以降で使用可能

1150

vc~invitation-accepted.caf

vc~invitation-accepted.caf

VCInvitationAccepted

4.0 以降で使用可能

1151

vc~ringing.caf

vc~ringing.caf

VCRinging

4.0 以降で使用可能

1152

vc~ended.caf

vc~ended.caf

VCEnded

4.0 以降で使用可能

1153

ct-call-waiting.caf

ct-call-waiting.caf

VCCallWaiting

4.1 以降で使用可能

1154

vc~ringing.caf

vc~ringing.caf

VCCallUpgrade

4.1 以降で使用可能

1200

dtmf-0.caf

dtmf-0.caf

TouchTone

1201

dtmf-1.caf

dtmf-1.caf

TouchTone

1202

dtmf-2.caf

dtmf-2.caf

TouchTone

1203

dtmf-3.caf

dtmf-3.caf

TouchTone

1204

dtmf-4.caf

dtmf-4.caf

TouchTone

1205

dtmf-5.caf

dtmf-5.caf

TouchTone

1206

dtmf-6.caf

dtmf-6.caf

TouchTone

1207

dtmf-7.caf

dtmf-7.caf

TouchTone

1208

dtmf-8.caf

dtmf-8.caf

TouchTone

1209

dtmf-9.caf

dtmf-9.caf

TouchTone

1210

dtmf-star.caf

dtmf-star.caf

TouchTone

1211

dtmf-pound.caf

dtmf-pound.caf

TouchTone

1254

long_low_short_high.caf

long_low_short_high.caf

Headset_StartCall

1255

short_double_high.caf

short_double_high.caf

Headset_Redial

1256

short_low_high.caf

short_low_high.caf

Headset_AnswerCall

1257

short_double_low.caf

short_double_low.caf

Headset_EndCall

1258

short_double_low.caf

short_double_low.caf

Headset_CallWaitingActions

1259

middle_9_short_double_low.caf

middle_9_short_double_low.caf

Headset_TransitionEnd

1300

Voicemail.caf

Voicemail.caf

SystemSoundPreview

1301

ReceivedMessage.caf

ReceivedMessage.caf

SystemSoundPreview

1302

new-mail.caf

new-mail.caf

SystemSoundPreview

1303

mail-sent.caf

mail-sent.caf

SystemSoundPreview

1304

alarm.caf

sq_alarm.caf

SystemSoundPreview

1305

lock.caf

sq_lock.caf

SystemSoundPreview

1306

Tock.caf

sq_tock.caf

KeyPressClickPreview

3.2 より前は SystemSoundPreview カテゴリでした。

1307

sms-received1.caf

sms-received1.caf

SMSReceived_Selection

1308

sms-received2.caf

sms-received2.caf

SMSReceived_Selection

1309

sms-received3.caf

sms-received3.caf

SMSReceived_Selection

1310

sms-received4.caf

sms-received4.caf

SMSReceived_Selection

1311

-

-

SMSReceived_Vibrate

1312

sms-received1.caf

sms-received1.caf

SMSReceived_Selection

1313

sms-received5.caf

sms-received5.caf

SMSReceived_Selection

1314

sms-received6.caf

sms-received6.caf

SMSReceived_Selection

1315

Voicemail.caf

Voicemail.caf

SystemSoundPreview

2.1 以降で使用可能

1320

Anticipate.caf

Anticipate.caf

SMSReceived_Selection

4.2 以降で使用可能

1321

Bloom.caf

Bloom.caf

SMSReceived_Selection

4.2 以降で使用可能

1322

Calypso.caf

Calypso.caf

SMSReceived_Selection

4.2 以降で使用可能

1323

Choo_Choo.caf

Choo_Choo.caf

SMSReceived_Selection

4.2 以降で使用可能

1324

Descent.caf

Descent.caf

SMSReceived_Selection

4.2 以降で使用可能

1325

Fanfare.caf

Fanfare.caf

SMSReceived_Selection

4.2 以降で使用可能

1326

Ladder.caf

Ladder.caf

SMSReceived_Selection

4.2 以降で使用可能

1327

Minuet.caf

Minuet.caf

SMSReceived_Selection

4.2 以降で使用可能

1328

News_Flash.caf

News_Flash.caf

SMSReceived_Selection

4.2 以降で使用可能

1329

Noir.caf

Noir.caf

SMSReceived_Selection

4.2 以降で使用可能

1330

Sherwood_Forest.caf

Sherwood_Forest.caf

SMSReceived_Selection

4.2 以降で使用可能

1331

Spell.caf

Spell.caf

SMSReceived_Selection

4.2 以降で使用可能

1332

Suspense.caf

Suspense.caf

SMSReceived_Selection

4.2 以降で使用可能

1333

Telegraph.caf

Telegraph.caf

SMSReceived_Selection

4.2 以降で使用可能

1334

Tiptoes.caf

Tiptoes.caf

SMSReceived_Selection

4.2 以降で使用可能

1335

Typewriters.caf

Typewriters.caf

SMSReceived_Selection

4.2 以降で使用可能

1336

Update.caf

Update.caf

SMSReceived_Selection

4.2 以降で使用可能

1350

-

-

RingerVibeChanged

1351

-

-

SilentVibeChanged

4095

-

-

バイブレーション

2.2 より前はこのサウンドのカテゴリはありませんでした。

SDK では、これは定数 kSystemSoundID_Vibrate です。