Skip to content

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:

PropertyTypeDescription
srcstringAddress of the audio resource, used for direct playback
startTimenumberStart position of playback (in s), default 0
autoplaynumberWhether to start playing automatically, default false
loopnumberWhether to loop playback, default false
volumenumberVolume. Range 0~1. Default 1
playbackRatenumberPlayback speed. Range 0.5~2.0. Default 1 (Android only)
durationnumberLength of the current audio (in s), read-only. Returned only when a valid src is set
currentTimenumberCurrent playback position of the audio (in s), read-only. Returned only when a valid src is set; time is kept to 6 decimal places
pausednumberWhether currently paused or stopped, read-only
bufferednumberTime 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