seekMusicToPosInTime method

void seekMusicToPosInTime(
  1. int id,
  2. int pts
)
override

Setting the Playback Progress (ms) of Background Music

This API is used to set the playback progress of background music.

  • Parameters:
    • id(int):
      • Music ID.
    • pts(int):
      • Unit: millisecond.

Note: Do not call this API frequently as the music file may be read and written to each time the API is called, which can be time-consuming. Wait until users finish dragging the progress bar before you call this API. The progress bar controller on the UI tends to update the progress at a high frequency as users drag the progress bar. This will result in poor user experience unless you limit the frequency.

Implementation

void seekMusicToPosInTime(int id, int pts) {
  _audioEffectFFIBindings.seek_music_to_pos_in_time(_nativePointer, id, pts);
}