Question

I added a SurfaceView into the Cube demo from the ApiDeoms. And tried to use a MediaPlayer to play with it. But it failed with low-level player error which is different on different devices. Is it possible to play videos on a GLSurfaceView or it's all about hardware support?

Was it helpful?

Solution 2

I found out that depends on native decoder support. If it failed on a device, the device does not support it.

OTHER TIPS

To say "If it failed on a device, the device does not support it." is pretty irresponsible considering you're giving advice to people who are at the demo level and might not know how infested these message boards are with people who "answer" questions without having a clue what they are talking about.

There are hundreds of different errors that you could be experiencing, however the short answer to the question:

"Is it possible to play videos on a GLSurfaceView"

would simply be "yes it is". If your device is OpenGL compliant (pretty much if it was built this decade then that's a safe bet), then you can display video in some form or another with it. If you want a more informative answer however you're going to have to provide quite a bit more information, at the very least exactly what the errors are and ideally some logcat output.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top