mercredi 15 février 2017

How to Cast ANY Video/Playlist from the YouTube App to your Google Home

One of the most frustrating parts of dealing with any new Google product is the lack of missing features that one would think would be an obvious inclusion.

Those of you who have purchased the Google Home are probably thrilled that the device can act as a Google Cast receiver, enabling you to choose your favorite songs on your smartphone to begin playback on the Google Home. But one application has been missing support for casting to the Google Home, and it’s the official YouTube for Android app.

It’s not as though there’s any technical barrier preventing the Google Home from playing the audio of a YouTube video – after all, this very same feature exists on the desktop YouTube page. But try to cast the same video while browsing from your smartphone and you’ll notice the option to cast to your Google Home is conspicuously missing.

While we can only guess why this seemingly obvious functionality is missing from the Android app (perhaps to push users to use YouTube Music – which coincidentally allows you to cast to the Google Home), we can’t say for sure why it’s not there. There is a lot of content available on YouTube where listening to just the audio is preferable, but said content isn’t available on YouTube Music, so we wanted to try to find a way around this issue anyways.

Although it is technically possible to cast any and all audio generated on your smartphone by going to the Google Home app and selecting the “Cast screen/audio” option in the sidebar, I personally don’t like this option because it requires you to manually enable this option every time you want to cast a video and also requires your phone to continue playing the video which prevents you from using other apps. Thus, I came up with a cleaner solution, one that takes advantage of the Google Home’s native Google Cast functionality but doesn’t require your phone to be held hostage.


Cast any Video from the YouTube App to Google Home

The idea behind this trick is very simple. We will be sending the YouTube video or playlist URL to the Google Home so it can independently handle playback. To do this, we will take advantage of two different Tasker plug-ins: AutoShare and AutoCast. AutoShare will allow us to share the URL of the YouTube video/playlist from Android’s built-in share menu while AutoCast will then cast that link to the Google Home via the Google Cast protocol so it can start playback. Until Google finally updates the YouTube app to enable casting to the Google Home, this is the cleanest, simplest option. Here’s how it’s done.

The first thing we will need to do is to setup both AutoShare and AutoCast. Open up AutoShare and make sure that AutoShare Command is checked underneath where it says “AutoShare Settings.” Then, tap on Manage Commands. You should now enter the Commands creation screen. Up top, tap on the + icon to create a new command. Name it Cast to Home. AutoShare will ask you to give the command an icon. Use one of the “built-in” icons or pick whatever icon you like – it really doesn’t matter.

Once you’ve done that, next we’ll move on to setup AutoCast. Open up the AutoCast application and tap on Manage Cast Devices. Tap on the + icon up top and wait until AutoCast detects your Google Home. Add your preferred Google Home device(s) to the list. If your Google Home device doesn’t show up, double check that you are on the Beta version of AutoCast since the stable Play Store version does not have Google Home support yet!

Now, we will connect the two plug-ins via Tasker. Here is the description of the Task, for those of you more knowledgeable in Tasker. Read on for step-by-step instructions if you are unfamiliar with Tasker.

Profile: Home - Play Youtube Audio (156)
Event: AutoShare [ Configuration:Command: Cast to Home
Sender: all
Subject: all
Text: all
Image: all ]
Enter: Anon (157)
A1: AutoCast Best Guess [ Configuration:Cast Device: Bedroom Home
Value to Cast: %astext Timeout (Seconds):0 ]

Open up Tasker and create a new Profile by tapping on the + icon in the bottom right corner. Tap on Event –> Plugin –> AutoShare then AutoShare again when it pops up. Tap on the pencil icon to bring up the AutoShare configuration. Under Command Filter select Cast to Home, which is the command we created earlier. Press on the checkmark icon and then tap the back arrow in the top left to exit the Profile configuration.

Next, you will be asked to name a Task. You can choose to name it or not, it doesn’t matter. Tap on the checkmark to enter the Task creation screen. In the bottom middle of the screen, tap on the + icon once again to create a new Action for this Task. Click on Plugin –> AutoCast –> AutoCast Best Guess. Tap on the pencil icon to open AutoCast’s configuration screen. Under Cast Device select your Google Home device of choice. For the Value to cast type %astext. This variable will contain the URL we will be sharing from YouTube to the Google Home. Tap on the checkmark up top to finish editing this Action and back out all the way to Tasker’s main screen.

You’re done! Like I said, this is a fairly simple solution as it only requires a single Action in Tasker to be run. How do you actually make it run, though? Just find any YouTube video or playlist URL (either on the web or shared from within the YouTube app), select AutoShare Command in Android’s share menu then finally select Cast to Home to make AutoCast start playback on your Google Home.

Playback should begin shortly on your Google Home device. Playlists will automatically cycle through each video one-by-one. If you want to stop playback, you can either force it to stop by tapping on the AutoCast notification on your smartphone or by using one of the usual Google Home commands. I prefer “Hey Google, shut up.” But to each their own.


Importing the Profile in Tasker

As always, we’re providing a link to download the profile for those of you who just want to import it and get started. In order to import this profile, first download the .prf.xml file from the below link. Save it anywhere on your internal storage. Open up Tasker and disable Beginner Mode in Preferences. Then, go back to the main screen and long-press on the “Profiles” tap up top. A popup should show with an option to “Import” a profile. Tap on that and browse to where you saved the XML file and select it to import. Do note that importing this profile will still require you to setup AutoShare and AutoCast, and you will also need to edit the “Cast Device” under the “AutoCast Best Guess” action so it will point to your particular Google Home.

Download the “Cast to Google Home” Profile from AndroidFileHost!

Let us know in the comments below if this worked for you!



from xda-developers http://ift.tt/2llmA8J
via IFTTT

Aucun commentaire:

Enregistrer un commentaire