Fast forward/rewind in Audio Player
It would be nice if we were able to implement fast forward and rewind capability in the Audio Player API. There is no built in intent that would allow us to do this. This would also need to include the current offsetinms (the amount of time that has been played so far) in the request to the code.
Joseph Kesselman commented
As a stopgap, of course, you can implement this as an Intent in your own application -- but until/unless your app is allowed to use Name-Free Interaction, you'd have to prefix it with then name. "Alexa, tell mySkillName to rewind one minute."
You can implement it by starting a new audio play with the offset adjusted appropriately, making sure not to go to a negative offset.
Two points to note:
1) StartOverIntent is a standard no-name operation which can be implemented as "reset offset to 0"; that handles "Alexa, restart".
2) Specifying the offset as something deep in the audio file (minute 45 of an hour-long MP3, for example) will sometimes result in a very long delay before sound can start playing, especially if that audio isn't already locally cached. Basically, with a compressed format like standard MP3, the only way to move to a specific offset is to decompress sequentially through the file until that point is reached, basically doing a high-speed silent fetch-and-playback -- and for a long jump that can burn a lot of compute resource. Unfortunately I've found no way to determine whether that decompression delay will occur, so I have my choice of either always warning people that they may have to wait or never warning them; neither is ideal. (I'd settle for having it play a "scrubbing tape" sound effect quietly during the process, so the user can tell something is being done...)
There are probably alternative compression formats which divide the file into separately compressed fixed-time-length chunks and so can speed up this fast-forward-long-distance process, but I don't know whether the Alexa supports any of those.
So... basically, as things stand now, the human factors of fast forward/rewind may leave something to be desired, even if you're willing to use "ask skill to". I've left them disabled in my own skill for that reason, pending a better solution.
Jennifer Holladay commented
It would be awesome to have a built in intent for the audio player API. it would be nice to be able to have users be able to say "alexa, fast forward 3 minutes"
Then that would send a request to the Lambda code that contains the current playback time (offsetinms) and also the amount of time that needs to be advanced.