This is how it'll look like when you're done:
STEP 1 - IMPORT YOUTUBE API IN AUTOWEB
- Open AutoWeb -> My Web Services
- Import the YouTube Web Service
STEP 2 - CREATE NATURAL LANGUAGE VOICE COMMAND
- Open Tasker and create a new profile with the AutoVoice Natural Language event condition
- Create a new command with a command like play some video on my pc and a response like ok playing some video on your pc
- Highlight some video and create a variable called video with the expression
- Accept the command and create a task for the profile
STEP 3 - FIND VIDEO ID
%videoid1 is the first value in the %videoid() array, which is a list of all video ids found on youtube for the query. This way you get the first result from the search
- Add a flash action showing that you're going to play %video on your PC
- Add an AutoWeb action
- Select the YouTube API and the Search action
- In the Query field write %video (which contains the video you said in the command)
- In the output fields select the Video Id field so you can get that variable in Tasker
- Add a flash action in Tasker showing the %videoid1 you found
STEP 4 - PUSH VIDEO TO PC
https://www.youtube.com/tv?v= is a special type of URL that opens the video in TV mode. If you follow that with a video ID like we did here the video will start playing right away in full screen
- Add a Join Send Push action
- Set the device to the chrome device you want to receive the video in
- Set the URL field to https://www.youtube.com/tv?v=%videoid1
- Exit Tasker to save
STEP 6 - TEST
If you now say something like play nature in 4k on my pc the video should be pushed to your PC and start playing in full screen
Play a YouTube Video on your PC with a Natural Language Voice Command
Learn how to search for a video on YouTube and play it on your PC using a simple voice command