Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
PhilAnderson888
Channel Surfer

Voice Control - Intercepting 'search for' and 'play' commands

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
supports_input_launch=1
supports_etc_seek=1
supports_etc_next=1

Device I am using is a Roku Streambar with latest firmware 10.0

0 Kudos
6 REPLIES 6
RokuJonathanD
Community Moderator
Community Moderator

Re: Voice Control - Intercepting 'search for' and 'play' commands

Hi @PhilAnderson888,

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. 

0 Kudos
PhilAnderson888
Channel Surfer

Re: Voice Control - Intercepting 'search for' and 'play' commands

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'

Tags (1)
0 Kudos
RokuPam
Streaming Star

Re: Voice Control - Intercepting 'search for' and 'play' commands

@PhilAnderson888 I believe the sample channel should include that behavior, but please let us know if you see otherwise. 

0 Kudos

Re: Voice Control - Intercepting 'search for' and 'play' commands

@PhilAnderson888  Hi! Did you find the solution for this? I have the same issue.

0 Kudos
PhilAnderson888
Channel Surfer

Re: Voice Control - Intercepting 'search for' and 'play' commands

Hello @MaksymDovhan 

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.

PhilAnderson888
Channel Surfer

Re: Voice Control - Intercepting 'search for' and 'play' commands

Thank you @RokuPam but unfortunately, no, I cannot see this behaviour within the sample app, thanks.

0 Kudos