tencent cloud

User Generated Short Video SDK

Android

Download
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-04-01 17:14:08

Adding Background Music During Shooting

// Set BGM path
mTXUGCRecord.setBGM(path);

// Play BGM from startTime to endTime
mTXUGCRecord.playBGMFromTime(startTime, endTime)

// Stop BGM playback
mTXUGCRecord.stopBGM();

// Pause BGM playback
mTXUGCRecord.pauseBGM();

// Resume BGM playback
mTXUGCRecord.resumeBGM();

// Set the volume of background music (BGM). Used when playing background music mixing to control BGM volume level
// Volume value: 1 is normal volume, recommended range 0~2. For higher BGM volume, larger values can be set
mTXUGCRecord.setBGMVolume(x);

// Set the start and end positions for BGM playback. Must be called before startPlay; invalid if called while paused
mTXUGCRecord.seekBGM(startTime, endTime);





도움말 및 지원

문제 해결에 도움이 되었나요?

피드백