tencent cloud

Last updated:2025-04-01 17:14:08
Android
Last updated: 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);




Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback