Skip to main content

androidGetDurationOfAudioPlayingInBackground

Type​

handler

Summary​

Gets the duration of the currently playing audio in milliseconds.

Syntax​

androidGetDurationOfAudioPlayingInBackground()

Description​

Use the androidGetDurationOfAudioPlayingInBackground function to get the duration of the currently playing audio in milliseconds.

If no duration is available (for example, if streaming live content), -1 is returned

Examples​

local tDurationInMilliseconds
if androidIsAudioPlayingInBackground() then
put androidGetDurationOfAudioPlayingInBackground() into tDurationInMilliseconds
end if

Compatibility and Support​

OS

android