I have trying to load youtube videos using stagewebview on AIR Desktop. (windows 10) Code below:
var SWV:StageWebView = new StageWebView(true); SWV.addEventListener(ErrorEvent.ERROR, swvErrorHandler); var swvHeight:Number = stage.stageHeight - (75); var swvWidth:Number = stage.stageWidth; var swvYCoord:Number = 75; SWV.stage = stage; SWV.viewPort = new Rectangle(0, swvYCoord, swvWidth, swvHeight); var vId:String = 'QowwaefoCec'; var urlToLoad:String = "http://www.youtube.com/embed/"+vId+"?rel=0&controls=1&showinfo=0&autoplay=0"; SWV.loadURL(urlToLoad);
Running the code gives a window with black background. Right clicking on it pops up the adobe flashplayer menu stating "Movie not loaded". Flash version is 184.108.40.206
If i use urlToLoad="https://www.youtube.com/watch?v="+vId; i get a malformed youtube page with majority of elements missing.
Tried with number of videos. result is always the same.
Can any one help please? I remember having tried out the above code a year or so back (when i was testing something else). It had definitely worked then. Cant fathom why it doesnot work now. Any help will be highly appreciated.