Quantcast
Channel: Adobe Community : All Content - AIR Development
Viewing all articles
Browse latest Browse all 2954

AIR for Android - StageWebView and Video (YouTube iFrame)

$
0
0

Hey all,

 

I've been converting an iOS tablet app over to Android and I've noticed the StageWebView has some curious limitations, especially with anything that accessed the GPU (video, etc).

 

At first the embedded YouTube (iframe) videos would just show the first frame of the video dutifully with the usual play button. When pressed, the video went black and all I heard was audio. The reason I even mention this is it took quite a while to locate this Adobe page with a section entitled "Enabling Flash Player and other plug-ins in a StageWebView object". So I added in the application tag to enable the plugins with acceleration (<application android:hardwareAccelerated="true"/>) and now I can see video.

 

The erratic thing is on ICS (Android 4.0.x) the video plays in the StageWebView but it horizontally closes to about 20% its normal width. The video player doesn't scale to 20% width, the iframe is just somehow collapsing to that narrow width removing the ability to see 80% of the video or use the controls (e.g. no fullscreen button visible).

 

When tested on Jelly Bean (4.1.x) the video does not pinch horizontally, it (amusingly) plays horizontally backwards (mirrored) and upside down.

 

Previously with hardwareAccelerated="true" missing I could press play and then toggle fullscreen and the video would work fine. After adding hardwareAccelerated="true" I can no longer use fullscreen, it crashes the devices after locking up.

 

I also tried appending ?html5=1 to the YouTube videos to force GoogleAPI to choose a HTML5 player. This didn't do anything.

 

Has anyone found the sacred tome of knowledge required to get an embedded YouTube video to play in a StageWebView iframe?


Viewing all articles
Browse latest Browse all 2954

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>