getOffsetInMilliseconds() - showing zero



I’m creating an audioplayer skill modified from the podcast player tutorial/template.

I’m having an issue with getOffsetInMilliseconds(), which is returning zero after playback is stopped.

Here’s the Alexa handler - which does execute at the correct point, but returns zero.

'AlexaSkill.PlaybackStopped'() {
		console.log('playback stopped. progress = ' + this.$alexaSkill.$audioPlayer.getOffsetInMilliseconds())
		let currentIndex = this.$user.$data.currentIndex;
		this.$user.$data.items[currentIndex].currentProgress = this.$alexaSkill.$audioPlayer.getOffsetInMilliseconds();

Any ideas?


In the end I accessed this information by using:


Is there any issue with this approach? And any ideas why getOffsetInMilliseconds() isn’t working for me?



Hi @tom,

at what point does the handler get invoked?


Hi. It’s invoked when the player is stopped, so that I can keep track of progress.


How do you test it, with an actual device or with the Jovo Debugger?


Hi - thanks for following this up. I was just in the debugger, but once I moved to the device I realised I had an issue with the token - now resolved.


closed #7