Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
PhilAnderson888
Level 8

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
Roku Employee
Roku Employee

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
Level 8

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
Roku Employee
Roku Employee

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
MaksymDovhan
Level 7

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
Level 8

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
Level 8

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