ios 开发 object-c AgoraRtcEngineKit 来电铃声
在AgoraRtcEngineKit中,可以使用以下代码来设置来电铃声:
// 设置铃声文件路径
NSString *ringFilePath = [[NSBundle mainBundle] pathForResource:@"ringtone" ofType:@"mp3"];
[self.agoraKit setParameters:[NSString stringWithFormat:@"{\"che.audio.ring_file_path\":\"%@\"}", ringFilePath]];
// 开启铃声
[self.agoraKit setEnableAudioVolumeIndication:500 smooth:3];
[self.agoraKit setAudioProfile:AUDIO_PROFILE_MUSIC_HIGH_QUALITY scenario:AUDIO_SCENARIO_GAME_STREAMING];
其中,ringtone.mp3是你自定义的铃声文件。使用上述代码,你可以设置来电铃声为自定义的铃声文件
原文地址: https://www.cveoy.top/t/topic/iIUF 著作权归作者所有。请勿转载和采集!