Skip to main content
zulin
Participating Frequently
September 5, 2012
Question

How can I play video on Android using native player?

  • September 5, 2012
  • 1 reply
  • 11709 views

Is there a way to tell android to open my mp4 (either in assets or on external sd)  with it's native video player?

Just like if I tap this (mp4) file in any android file manager.

reasons:

1 - I don't want to write my own player (especially when I have one built in)

2 - I assume playback experience may be better when playing large file NOT through the AIR.

So, can I  make something like "NativeApplication.execute(pathToMp4)"?

This topic has been closed for replies.

1 reply

sinious
Legend
September 5, 2012

Have you tried a StageWebView? I haven't touched Android much lately but I do a lot of iOS apps and iOS gives standard (quicktime/html5-esque) controls to any mp4 played directly in a StageWebView, with a fullscreen button. Just note on Android after AIR 3.0 device acceleration must be enabled.

zulin
zulinAuthor
Participating Frequently
September 6, 2012

Yes I tried. Maybe in iOS it is handled better but on Asus tablet I only got video controls displayed and sound was playing (while there was no video). This is not codec problem because I used mp4 recorded by device and its native player played it correctly. Same results (sound played, no video though) I got when tried to open same html in native browser (so maybe this has something to do with it).

It's sad I have to dance with playback and controls in flash rather than using native ...

Colin Holgate
Inspiring
September 6, 2012

If you are using Flex, make sure you have set the stage background to be transparent.