1

Playing a Youtube video inside an iframe in TEmbeddedWB has always worked, but now unfortunately it does not work anymore. Did Google change something to stop playing videos in programs with an embedded web browser? I have the following simplified HTML file (which loads and plays perfectly in any web browser):

<!DOCTYPE html>
<html>
  <head>
    <title>A Video</title>
  </head>
  <body>
    <iframe width="640" height="360" src="http://www.youtube.com/embed/HnbMYzdjuBs?feature=player_detailpage" frameborder="0" allowfullscreen></iframe>
  </body>
</html>

I load it with this code:

procedure TForm1.btn1Click(Sender: TObject);
begin
  EWB.LoadFromFile('D:\video.html');
end;

As I said, opening this file in any web browser opens and plays perfectly. But I see only a black screen and nothing happens.

EDIT 201306172342:

Even when I place the above HTML file on a web-server and navigate to it, it remains black:

WB.Navigate('http://www.mywebsite.com/video.html');

While, of course, displaying this page in web browser like e.g. Chrome shows and plays the video normally!

PLEASE, CAN ANYBODY HELP WITH THIS???

user1580348
  • 5,721
  • 4
  • 43
  • 105
  • Does it play when you open d:\video.html directly, via explorer? – Wouter van Nifterick Jun 16 '13 at 02:48
  • I don't know TEmbeddedWB, could it be a handled (covered) exception of a floating point error? http://www.bsalsa.com/forum/showthread.php?t=416 and http://stackoverflow.com/q/8200581/1699210 – bummi Jun 16 '13 at 06:03
  • You mean bsalsa one? Why don't You use a TWebBrowser instead? Anyway try changing User-Agent to some more popular, as this component has its own one. – Flash Thunder Jun 15 '13 at 22:39
  • @WoutervanNifterick Yes, when I open d:\video.html from Windows Explorer, either by double-click-opening in my default browser Chrome, or in MSIE, it displays the video and can be played normally. – user1580348 Jun 16 '13 at 08:54
  • @FlashThunder It also doesn't work with TWebbrowser now. It did also work with TWebbrowser about a week ago. I've tried several common user agent strings, it didn't help. Did anybody try it with TEmbeddedWB or TWebbrowser himself and can explicitely confirm or negate this behavior? – user1580348 Jun 16 '13 at 09:01
  • @bummi No, it is not a handled exception. As I said, it did work perfectly about 7-10 days ago BOTH in TEmbeddedWB and TWebbrowser. Please, somebody try it out. – user1580348 Jun 16 '13 at 09:06
  • Why do you open the youtube link in an iframe? you might as well load the same link directly. That way you don't need to load a local file and deal with possible cross site scripting issues for example. – Wouter van Nifterick Jun 16 '13 at 21:02
  • @WoutervanNifterick That's the YOUTUBE EMBED CODE! I don't want to see the whole youtube webpage, just the video alone! As I said, this always worked! Why don't you try it out yourself instead of giving useless tips? – user1580348 Jun 17 '13 at 20:07
  • 2
    @user1580348: whoa dude, why the rude tone? I don't feel like helping you out anymore. – Wouter van Nifterick Jun 17 '13 at 22:10
  • @user1580348: Just to echo Wouter's comment, please be calmer and more polite. I'm sure you feel frustrated about your problem, but behaving rudely to the people trying to help you won't help. (This advice applies for a lot of life, actually.) Wouter asked a valid question: don't reply as though it's a silly one. In your anger and quick dismissal you *missed his point*, too, which is that loading that page might (a) be safer and (b) might help diagnose a problem with your current page, eg if that one works and your local one doesn't. – David Jun 19 '13 at 11:49
  • In a simple test, it looks like there is a JavaScript error that is being eaten by the EmbeddedWB control. I get an error on Line 10, Character 79. It looks like YouTube has changed something in a JS library and your control is not handling it well. – Vivian Mills Jun 20 '13 at 16:16
  • @RyanJ.Mills Thanks. What about TWebbrowser? Even TWebbrowser does not show Youtube videos anymore (it did before). – user1580348 Jun 20 '13 at 22:05
  • 1
    @user1580348 Same error. TWebbrowser and TEmbeddedWB are the same control. Different wrappers. Here are a couple of related SO questions you may want to look at: http://stackoverflow.com/questions/3432585/is-twebbrowser-dependant-on-ie-version http://stackoverflow.com/questions/6823677/delphi-embeddedwb-twebbrowser-jquery-not-executing – Vivian Mills Jun 21 '13 at 15:28
  • 1
    @WoutervanNifterick I am sorry ant want to apologize for the tone; this was an emotional overreaction. – user1580348 Jun 22 '13 at 12:15

1 Answers1

3

From time to time, adobe removed his activex programs from the computer . (which is usually done with a plugin update) .
If you think this will be installed again the next time you update, you are mistaken.

First you should check whether this has already happened.

system settings

look for the Flash Player Icon.

enter image description here

in the extra properties you see a not installed .
(They would have better this message formulated that way.
Removed with the last plugin update).

enter image description here

Download the new aktivex part.

Flash Player Support Center

enter image description here

double click flashplayer_11_ax_debug.exe and follow the instructions.

A new control indicates. It already looks better.

enter image description here

Before Install the aktivex part.
To test this I have prepared a small test program. (XP Sp3, Delphi 5)
used youtube.htmlis the same as your video.html posted above.

unit youtube;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, OleCtrls, SHDocVw_EWB, EwbCore, EmbeddedWB, SHDocVw,
  MOZILLACONTROLLib_TLB;

type
  TForm1 = class(TForm)
    EmbeddedWB1: TEmbeddedWB;
    WebBrowser1: TWebBrowser;
    MozillaBrowser1: TMozillaBrowser;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
  EmbeddedWB1.Navigate('http://www.moskito-x.de/stack/youtube.html');
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  WebBrowser1.Navigate('http://www.moskito-x.de/stack/youtube.html');
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  MozillaBrowser1.Navigate('http://www.moskito-x.de/stack/youtube.html');
end;

end.

After pressing Button1 to Button3 , I get the following

enter image description here

After installing flashplayer_11_ax_debug.exe
I get the following.

enter image description here

The mozilla browser I will get to run yet.(Not Today :-) )

Your aktivex folder should now look like this.

enter image description here

In your question you said :

Playing a Youtube video inside an iframe in TEmbeddedWB has always worked,   
but now unfortunately it does not work anymore.

look at the date of your FlashUtil32_11_7_700_???_Plugin.exe
That was the time your TEmbeddedWB stops working.

moskito-x
  • 11,832
  • 5
  • 47
  • 60
  • Thank you very much! Reinstalling the ActiveX solved the problem! However, BEFORE installing the ActiveX, the System Settings FlashPlayer control panel DID show the correct version number (the same as it shows now AFTER having installed the ActiveX): !(http://img19.imageshack.us/img19/1421/zpj.gif) BTW, your linked youtube.html seems to be misconfigured: !(http://img854.imageshack.us/img854/412/dxb.gif) Do you think it is advisable to make sure the ActiveX is installed on the end-user's computer, to install it with the deployed install program of my application? – user1580348 Jun 22 '13 at 12:09
  • @user1580348 : A) Sorry , misconfigured my .htaccess :-). Now it works for all. B) Look for [flash-player-distribution.html](http://www.adobe.com/de/products/players/flash-player-distribution.html) – moskito-x Jun 22 '13 at 13:32