Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6595825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:59:24+00:00 2026-05-25T17:59:24+00:00

Somehow Youtube HTML5 video stopped working for me about a week ago. I have

  • 0

Somehow Youtube HTML5 video stopped working for me about a week ago. I have no idea why. Here’s the code that was working last week (well, not the real code, but the smallest example I could make):

public class VideoTestActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        WebView webView = new WebView(this);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.getSettings().setPluginState(PluginState.OFF);
        webView.setWebChromeClient(new TestWebChromeClient());

        setContentView(webView);

        // Try with http://player.vimeo.com/video/24158845 and it works.
        webView.loadUrl("http://www.youtube.com/embed/e2UIg3Ddfp0");
    }

    private class TestWebChromeClient extends WebChromeClient {
        @Override
        public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) {
            super.onShowCustomView(view, callback);
            VideoTestActivity.this.setContentView(view);
        }
    }
}

This doesn’t work on my phone or the emulator. The crazy part is that Vimeo still works great. I tried setting an iPhone user agent, but that didn’t work and I’m out of ideas. It really looks like Youtube has changed something…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:59:25+00:00Added an answer on May 25, 2026 at 5:59 pm

    Youtube may have changed something in their embedded page and most likely this is causing problems inside the WebView and that is why it is not working anymore.

    Also are you testing your app on the same device as before?

    I don’t think it is a good practice to use this solution, since you can not rely that the content that you display today from Youtube and it works, will also be the same in a few days and it will still work, as you have just encountered now. I had also similar problems with videos and Youtube content, it would work on one device, and not at all on some other devices. It is also a Flash content, and a lot of Android devices don’t have Flash and will not be able to play the content.

    A solution would be to create an Intent for playing the video:

          Intent videoIntent=new Intent(Intent.ACTION_VIEW, 
                                         Uri.parse("http://www.youtube.com/my_url"));
          startActivity(videoIntent);
    

    But what I would recommend is to encode the videos for Android as suggested in the Supported Media Formats and store them on your own server if you have the possibility.

    EDIT: They definetly changed something since there is an js error there. You can track them by using the WebChromeClient:

      mWebView.setWebChromeClient(new WebChromeClient(){
            @Override
            public void onConsoleMessage(String message, int lineNumber,
                    String sourceID) {
                super.onConsoleMessage(message, lineNumber, sourceID);
                Log.i("VIDEO VIEW",message);
            }
     }
    

    This is the message error I got:

    TypeError: Result of expression 'a' [undefined] is not an object.line 78sourcehttp://www.youtube.com/embed/e2UIg3Ddfp0
    

    I don’t know if it helps you, I’ll have another look later and see what I can find.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an embedded youtube video iframe in my html that I need to
Somehow Visual Studio search has stopped working for me. Anytime I search Entire Solution
Somehow, I can't seem to correctly implement a SortedMap. Here's a minimal (non-)working example:
I have a small AppEngine app that enables me to add YouTube videos to
Somehow, I cannot get this piece of Smarty code to work as required: {assign
Somehow, due to folder renamings and various other source code changes, I'm having an
Somehow my FireFox 2 got corrupted, and the status bar is about 3/4 above
Somehow I had the impression that ASP.Net differentiates URLs based on the number of
somehow I am going in circles here. Please forgive me if the answer to
Somehow am not successful with creating the query that I want. DB is to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.