sud.createInnerAudioContext
JS
InnerAudioContext sud.createInnerAudioContext()Creates an inner audio context InnerAudioContext object.
Return Value
- InnerAudioContext: Returns an InnerAudioContext instance; see the table below for details.
InnerAudioContext properties:
| Property | Type | Description |
|---|---|---|
| src | string | Address of the audio resource, used for direct playback |
| startTime | number | Start position of playback (in s), default 0 |
| autoplay | number | Whether to start playing automatically, default false |
| loop | number | Whether to loop playback, default false |
| volume | number | Volume. Range 0~1. Default 1 |
| playbackRate | number | Playback speed. Range 0.5~2.0. Default 1 (Android only) |
| duration | number | Length of the current audio (in s), read-only. Returned only when a valid src is set |
| currentTime | number | Current playback position of the audio (in s), read-only. Returned only when a valid src is set; time is kept to 6 decimal places |
| paused | number | Whether currently paused or stopped, read-only |
| buffered | number | Time point up to which the audio is buffered, read-only. Only guarantees that content from the current playback time to this time point is buffered |
