• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

VideoView

ShamusVW

Newbie
apologies, I initially posted this under "APPS & GAMES", I am now reproducing the question here...

I find that on some phones my VideoView says it is unable to play videos. Reading up on this issue, some people suggest changing the format to the older 3gp. However, on phones that used to play the mp4's, it only plays the audio on this 3gp format now (mine being one of them, a Samsung J5)

The strange thing is that I have these videos on a web server, and those phones that can't play the mp4 in the VideoView/app, if they navigate to the link/URL through the Chrome browser on their phone, they are able to click the link and the video plays fine.

Can someone suggest what I might try please, or what the problem might be?
Note that I have tried installing VLC app already and making it the default, however it still uses the default video player in the app/videoview.

Thank you.
 
Thank you for the quick response.
To set the default video player on my phone is not the question though. Regarding this anyway, it would appear that the gallery (as an example) doesn't allow you to change the default video player, it uses it's own built in one. To change the default player for other videos, you are able to find them in the "Files" app and then choose the default video from there.

My question relates to why on phones WITHOUT any other video player loaded except what comes standard on the phone, I play the video from a URL (on my web server), but when I try play that video from my app using the VideoView component, it says it can't play the video. Is it possibly that the browser again it's own version of a video player (because I assume each browser optimizes itself to try be faster than any other competing browser) as opposed to the one being used when the VideoView is called to play a video?

Is there a way within the app when calling the VideoView perhaps to specify which video player to use?
 
Each default video player will be different, from device to device, that is dictated by the manufacturer. So no 2 phones will play video exactly the same, and may not play at all.
That depends on video codecs, and any number of parameters involved to play a certain video.
Why not disable videoshow altogether?
 
Sorry, I don't know what videoshow is that you are referring to. Do you mean the VideoView? I am using this component to show the video, so I can't disable it.

The weird thing is that as an example on a phone where the video doesn't play, it is a late model phone of decent specs, and although it says it can't play the video in the app, it CAN play the video if you browse for it on our intranet, the exact same video, same phone. So any codecit might be needing on the app it obviously already has it if it can play the same video when clicked on in the intranet.
 
As an update to this, I figured out the problem.
It had nothing to do with what the default video player was, it was more about permissions.
So at a certain OS level, http sites are no longer accessible, only https. To bypass this restriction, you need to place the following in your manifests file:
Code:
android:usesCleartextTraffic="true"

Hope this helps someone. The only reason why I found this out was because my phone decided to do an update, and thereafter my phone couldn't play what it used to be able to play. Coincidence!
 
Back
Top Bottom