Skip to main content
Inspiring
July 6, 2012
Answered

Android 3.x App HTML5 video plays just sound and no video using StageWebView

  • July 6, 2012
  • 1 reply
  • 3688 views

Hi,

I have a webapp in a native container using StageWebView which works perfectly as an app on iOS but the Android app is not playing HTML5 videos properly.

The video loads but you don’t see any picture you can only hear sound. If you press fullscreen on the video though it does sometimes open in full screen and play the video.

What’s weird is if you just view the webapp in a browser on android, the video works fine no problems.

What’s going on here? It’s only when it’s contained in an app using StageWebView on Android that the video just breaks and only plays sound. The exact same code works perfectly with the iOS app version or just in a browser on Android.

This problem is the same  on android 3.x and 4.0.4

Can anyone help? Do I need to add some extra tag in the .app descriptor file perhaps to increase graphics or something? I have renderMode set to auto.

I’m really stuck on this I hope someone can help.

Thanks,

This topic has been closed for replies.
Correct answer vestaxpdx

I finally found out it is indeed due to hardware acceleration not being set to true.

You can set this is your -app.xml file

<android>

    <manifestAdditions>

        <![CDATA[

            <manifest>

                <application android:hardwareAccelerated="true"/>

            </manifest>

        ]]>

    </manifestAdditions>

</android>

Now videos play properly! Or though when pressing the full screen button it usually ends up crashing the device even on a samsung galaxy s3. I guess maybe I will just set the video tag to the whole size of the screen and turn off controls could be a fix.

Hope this helps someone.

1 reply

vestaxpdxAuthor
Inspiring
July 9, 2012

Has anyone got any input on this?

HTML5 videos just don’t play in StageWebView on android 3.x or 4.0.4 you can only ever hear the sound but not the video. The same HTML5 code plays fine on the default android browser. Is this an Air 3.2 bug?

I also noticed that the performance is way slower in StageWebView than the default android browser. Which makes me think its linked to some kind of graphics rendering problem or something.

I’m using the latest Samsung Galaxy S3 (4.0.4) and a Motorola Xoom (3.2)

Can anybody help? the same code works perfectly on iOS its just android thats causing the problem.

vestaxpdxAuthorCorrect answer
Inspiring
July 10, 2012

I finally found out it is indeed due to hardware acceleration not being set to true.

You can set this is your -app.xml file

<android>

    <manifestAdditions>

        <![CDATA[

            <manifest>

                <application android:hardwareAccelerated="true"/>

            </manifest>

        ]]>

    </manifestAdditions>

</android>

Now videos play properly! Or though when pressing the full screen button it usually ends up crashing the device even on a samsung galaxy s3. I guess maybe I will just set the video tag to the whole size of the screen and turn off controls could be a fix.

Hope this helps someone.

December 12, 2012

vestaxpdx,

Thank you for posting this! Took forever to find this post, however i can finally render video in a stageWebView.  This kind of information should be within the StageWebView documentation, would have saved myself (and im sure other devs) alot of time