Skip to content Skip to sidebar Skip to footer

Video's Suddenly Stopped Playing From Youtube API

We've been using the Youtube API in our Android Application for about 3 months now, we removed alot of old video's the last couple of days and updated our MYSQL server where the vi

Solution 1:

I had an issue earlier with the YouTube API, and the bug was introduced with a specific version of the YouTube app. That is, the presence of the bug in my application depended on the installed version of YouTube.

If you go to Settings > Apps > YouTube, tap Uninstall Updates, you can install another version of YouTube directly with an .apk file downloaded from here, for example.

Install an earlier version of YouTube for a temporary solution. You may want to raise an issue at the issue tracker for YouTube, and wait for the fix.


Solution 2:

I encountered such a problem, some videos can be played only in the YouTube player. To circumvent this problem, we had to pump out all the videos from youtube and use the id of the video.


Solution 3:

have you tried this code snippet

 /**
 * Method used to play video in a new activity
 *
 * @param context the activity context
 * @param url     the url of the youtube video to be played
 */
public static void playVideo(Context context, String url) {

    String ytId = extractYTId(url);
    if (ytId != null && ytId != "") {
        Intent videoIntent = YouTubeStandalonePlayer.createVideoIntent((Activity) context, DEVELOPER_KEY, ytId, 0, false, false);
        context.startActivity(videoIntent);
    } else {
        Toast.makeText(context, "this is not youtube url!", Toast.LENGTH_SHORT).show();
    }

}

you just have to add youtube Api .jar and call this method then hope so your video will play..

enjoy your code time:)


Solution 4:

If you go to Settings > Apps > YouTube, tap Uninstall Updates, you can install another version of YouTube directly with a .apk file downloaded from here for example.


Post a Comment for "Video's Suddenly Stopped Playing From Youtube API"