What is the right way to intercept these commands 1) Search for (item). 2) Play (item) so my channel does not get relaunched by Roku?
Hello everyone. I am looking to certify my channel with voice controls and have successfully implemented all of the basic and advanced controls like 'next', 'forward 20 seconds', restart, play/pause etc. I am intercepting transport events fine and returning "success" to the Roku OS so Roku knows I have handled these events.
I am now working through the trickier 'Direct-To-Play' where we issue the command to
- search for items on the channel
- play an item on the channel
At the moment both the search and play commands exit our channel and go to Roku search, and in the case of playing an item the deep link then kicks in and the channel is restarted and the item plays correctly. So deep linking is implemented correctly and works fine.
My issue is - for searching and playing items already in my channel, how do I intercept the command and prevent the exit to Roku OS and the re-starting of my channel? On the documentation for Direct-To-Play it states "Requirements - To participate in Direct to Play, your channel must support the following integrations: 1. Roku Search. 2. Deep linking. 3. roInput. Prevents your channel from re-launching when it is handling deep link requests and is already running. .... "
What is the right way to implement task 3 above ie intercept these commands 1) Search for (item). 2) Play (item) so my channel does not get relaunched by Roku? When I speak either command, it's not registering as an event for me to handle.
PS I have added these lines to my manifest file
Device I am using is a Roku Streambar with latest firmware 10.0
Have you taken a look at the Voice control sample channel on GitHub? It demonstrates how to use roInput to receive voice commands while the channel is running.
Hi Jonathan, yes thank you and I have. Did this sample have the feature to play an item by name as I did not notice that. eg 'Play The Simpsons'
@PhilAnderson888 I believe the sample channel should include that behavior, but please let us know if you see otherwise.
Unfortunately no - I suspect it is something happening at the Roku firmware level which is bypassing the app completely, so the signal is not reaching the app. But to get confirmation of this we have submitted a ticket via our Roku Partner Success program directly, and are awaiting an answer. I will update accordingly, thanks.
Thank you @RokuPam but unfortunately, no, I cannot see this behaviour within the sample app, thanks.