mickorz / stagewebviewbridge

Automatically exported from code.google.com/p/stagewebviewbridge
0 stars 0 forks source link

Loading javascript youtube API problem on Android #37

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. load the youtube API width 
 tag = document.createElement('script');
tag.src = "//www.youtube.com/iframe_api";

firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);

2. when the api is loaded calls to the player load
 var player;
      function onYouTubeIframeAPIReady() {
          StageWebViewBridge.call('pruebaBis');

        player = new YT.Player('player', {
          height: alto,
          width: ancho,
          videoId: 'u1zgFlCw8Aw',
         playerVars:{
             'controls':0,
             'showinfo':0
         },
          events: {
            'onReady': onPlayerReady,
            'onStateChange': onPlayerStateChange,
            'onError': onPlayerError
          }
        });

3. and sometimes, not always, in android, the iframe changes to white and 
doesn't load the video.
Looks like the javascript coudn't generate the player ¿could be a memory lak?

What is the expected output? What do you see instead?
show the black youtube video player

What version of the product are you using? On what operating system?
AIR 3.5 on Android

Please provide any additional information below.

Original issue reported on code.google.com by jorgegvi...@gmail.com on 21 Feb 2013 at 9:18