Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Audio position
Started by FileEX Apr 17 2019 06:34 PM

1 reply to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

FileEX

[GLOBAL: userInfoPane.html]
FileEX
  • Observer

  • 3 posts
  • Corona SDK

Hi, how can i get playback actual position? Eg. i want do clock like positon / length (eg. 3:12 / 4.46), but i don't see any function which returns me actual playback position.



[TOPIC: post.html]
#2

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Contributor

  • 683 posts
  • Corona SDK

Hmm... I'm not sure if there is such a thing either.

One trick that you could do is to store the system.getTimer() ( https://docs.coronalabs.com/api/library/system/getTimer.html ) when you start the playback. You can then use that to calculate the time that has passed since the playback began by calculating the difference between the original and current time.




[topic_controls]
[/topic_controls]