I found that I can start a YouTube video in stock YouTube player this way:
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:U79wVTdnMpw"));
startActivity(i);
But it doesn't work. The YouTube player is started, but I get an error:
There was a problem with the network [400]
I have updated the YouTube app but nothing changes.
I am using Android ICS 4.0.1.
Step A: Go to Settings and select App Management b: Tap the App List and pick out “YouTube”. Step B: Then click on 'Storage' and press 'Clear cache'. Step C: This may reset your default YouTube app and probably restore server error [400].
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, or deceptive request routing).
If you see error 400 while watching online videos on your smart TV, first try reloading the video, then clear the app cache in your TV's settings. If you're still having trouble, log out and log back into the streaming app, then restart your TV.
I found the answer on this Google product forums which helped to solve my problem - which was exactly the problem you're experiencing :)
SOLUTION: Give ONLY the YouTube ID and not the entire YouTube URL to the loadVideo()
function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With