Is there a way to determine if video can play on the device?

I did some deep research on playing videos on Android devices, and I came to the conclusion that there are some Android devices that cannot play videos recorded on other Android devices.

Now I shoot the intention to play the video, but the player says: "Sorry, the video cannot be played."

I was wondering if there is a way to detect that the video cannot be played before I kill the intent?

+3
source share
1 answer

Playback depends on the file formats supported by the player. Therefore, if you use decoders built into the Android platform (default Android decoders), then this is a more specific version of the Android OS. Thus, you can check the supported multimedia formats depending on the OS version of the device and allow launch if it is supported.

As an application developer, you can use any media codec that is available on any Android device, including the Android platform and those that are device-specific. However, it is best to use media coding profiles, which are agnostic devices.

0
source

All Articles