Skip to main content
August 8, 2012
Question

Android StageWebview won't play youtube videos

  • August 8, 2012
  • 4 replies
  • 2632 views

Hey Guys,

I built an app for ios that displays html in a stagewebview and in that html, is youtube vidoes that when you click on play in the native player for ios.

I am trying to do that for andriod, and it is not working.

Any ideas? It is just showing up blank where the video should go? I am using air 3.2 with cs6.

Thanks

This topic has been closed for replies.

4 replies

August 10, 2012

Here is more info.

It shows a black box on my samsung tab 10.1, and if you tapp on it really fast you can get it to go into fullscreen mode where it place the youtube video. Any one have any ideas on how to get it to work in non full screen.

webView = new StageWebView();

webView.stage = this.stage;

webView.viewPort = new Rectangle( 0, 100, screenWidth, 779  );

htmlString = '<iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/YOsrVaLbKCY" frameborder="0"></iframe>';

webView.loadString( htmlString );

please Help!

Participating Frequently
September 19, 2012

It seems that youtube has blocked it, because its runs few months ago:

stageWebView.loadURL( 'http://www.youtube.com/v/YOsrVaLbKCY?version=3' );

Participant
December 15, 2012

It seems to work with "http://youtube.googleapis.com/v/0msotE6Ygqk?version=3"

But I suppose you can use it with any video...

I am about to test in my tablet...in my desktop works fine.