InnerAudioContext.seek(params: Object)

Requires:
BaseKit≥2.3.2
Platforms:
iOSAndroid

Description

Seek to the specified position

Parameters

PropertyTypeRequiredDefaultDescription
positionnumberNo0.0Seek time in seconds. Precision to 3 decimal places (ms-level accuracy)
complete() => voidNo-Completion callback (executed on both success and failure)
success() => voidNo-Callback on successful API call
fail(params: Object) => voidNo-Failure callback
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

import { createInnerAudioContext } from '@ray-js/ray'

const manager = await createInnerAudioContext();

manager.seek({
  position: 0.0,
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});