App Name: ABCNews
App Link on Amazon Appstore (found through Developer Console > Actions column in App List > View on Amazon.com): Your App Link [e.g., Netflix - App on Amazon Appstore ]
SDK Version: v0.23.9221
React Native Version: RN0.72
We’re implementing media controls using `@amazon-devices/kepler-media-controls`. We’ve registered handlers for `handleFastForward` and `handleRewind`, but voice commands never invoke them — everything routes to `handleSkipForward`/`handleSkipBackward` with correct time offset when input, or the default one when not.
**Question:** Under what conditions do `handleFastForward` and `handleRewind` actually get called? Is there a voice utterance?
Setup
We register all handlers via `MediaControlServerComponentAsync.getOrMakeServer()` and declare both `Action.FAST_FORWARD` and `Action.REWIND` in our capabilities:
capabilities: {
actions: [
Action.PLAY,
Action.PAUSE,
Action.STOP,
Action.SKIP_FORWARD,
Action.SKIP_BACKWARD,
Action.FAST_FORWARD,
Action.REWIND,
Action.START_OVER,
Action.NEXT,
Action.PREVIOUS,
],
speeds: [1.0],
forwardSkipSteps: [toTimeValue(10)],
backwardSkipSteps: [toTimeValue(10)],
attribute_options: [],
features: ["AdvancedSeek", "VariableSpeed"],
}
Our “handleFastForward/handleRewind” points to a different method than “handleSkipForward/handleSkipBackward”
We captured both the native KCP (Kepler Cluster Protocol) layer and JS handler output simultaneously.
We tested the following voice commands and had the following results.
Logs output example for “Fast Forward” voice command:
“Fast Forward” (20:27:36–20:27:40)"
Aug 21 20:27:36.257056 firestick-0a8545baa0414137 local0.info lcm_service[890]: 1423 ITimeoutMgr:StateMachine::handleEventExecutionTask - StateMachine ALEXA_SPEECH_START
Aug 21 20:27:39.611630 firestick-0a8545baa0414137 local0.info lcm_service[890]: 1423 ITimeoutMgr:StateMachine::handleEventExecutionTask - StateMachine ALEXA_SPEECH_START
Aug 21 20:27:39.802766 firestick-0a8545baa0414137 local0.info com.abclocal.kabc.tv.amazon:pkg[24951]: 2576324361 INFO com.amazon.kcp.provider: KCP flow complete - Provider-Side Invoke - tx: 43980 - Invoking provider invoke callback - (endpoint: 134 - cluster: 1286 - command: 0x8)
Aug 21 20:27:39.803219 firestick-0a8545baa0414137 local0.info com.abclocal.kabc.tv.amazon:pkg[24951]: 2576324361 INFO com.amazon.kepler.media.control: [MediaPlaybackCluster.cpp:540] command id: 8
Aug 21 20:27:39.803351 firestick-0a8545baa0414137 local0.warning com.abclocal.kabc.tv.amazon:pkg[24951]: 3449343573
WARNING com.amazon.keplerscript: [KeplerScript-JavaScript] '[VegaMediaControl] DEBUG Skip forward command received:',
30 Aug 21 20:27:40.020508 firestick-0a8545baa0414137 local0.info com.abclocal.kabc.tv.amazon:pkg[24951]: 2576324361 INFO com.amazon.kcp.provider: KCP flow begin - Provider-Side Respond - tx: 43980 - Received response from provider - (endpoint: 134 - cluster: 1286 - command: 0x8)
Aug 21 20:27:40.362946 firestick-0a8545baa0414137 local0.info lcm_service[890]: 1423 ITimeoutMgr:StateMachine::handleEventExecutionTask - StateMachine ALEXA_SPEECH_STOP
This is a sequence of commands we introduce and the output:
Time | Voice Command | KCP Command | Command ID | JS Handler Fired | Value
20:27:32 | “fast forward” | 0x8 | 8 | Skip forward | 10s
20:27:39 | “forward 30 seconds” | 0x8 | 8 | Skip forward | 30s
20:27:45 | “forward” | 0x5 | 5 | Next | —
20:27:59 | “fast forward” | 0x8 | 8 | Skip forward | 10s