📜  离子播放通知声音 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:17.639000             🧑  作者: Mango

代码示例1
import { NativeRingtones } from '@ionic-native/native-ringtones/ngx';


constructor(private ringtones: NativeRingtones) { }

...
this.ringtones.getRingtone().then((ringtones) => { console.log(ringtones); });

this.ringtones.playRingtone('assets/ringtones/sound_1.caf');

this.ringtones.stopRingtone('assets/ringtones/sound_1.caf');