-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
retriever.setDataSource(source) not working on older phones #80
Comments
what is your phone version? (API version) |
you should search for "software information" in Settings, it should show something like Android version |
Android version 10(Q) |
hi @LianVyv in this case the Like this: public static MediaMetadataRetriever getMediaMetadataRetriever(String source) {
MediaMetadataRetriever retriever = new MediaMetadataRetriever();
try {
if (source.startsWith("http://") || source.startsWith("https://")) {
retriever.setDataSource(source, new HashMap<>());
} else {
retriever.setDataSource(source);
}
return retriever;
} catch (Exception e) {
Log.e(TAG, "Error setting data source");
Log.e(TAG, e.printStackTrace());
Log.e(TAG, e.getMessage());
try {
retriever.release();
} catch (Exception ee) {
Log.e(TAG, "Error releasing retriever", ee);
}
return null;
}
} |
@maitrungduc1410 I had to travel this week. I will get back to you on this next week when I'm back. |
this package crash android app when select the video more than 2 minute and 10 seconds without showing any error and some devices show storage permission denied |
hi @bilalkhan-tech can you please check on Android studio -> logcat, and see what's the error printed at the time it's crashed? |
Yes I have checked but there is no error on the console
…On Sat, Nov 30, 2024, 9:40 PM Duc Trung Mai ***@***.***> wrote:
hi @bilalkhan-tech <https://github.com/bilalkhan-tech> can you please
check on Android studio -> logcat, and see what's the error printed at the
time it's crashed?
—
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOZXDZCZS5EUZSUBYEZGUIL2DHS57AVCNFSM6AAAAABRQEBQPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBZGAZTAMZQGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@bilalkhan-tech no, not console, it's LogCat from Android studio, if it's crashed, there must be some crash log there |
@maitrungduc1410 I have came across this issue where my one Huawei phone is not working when setting the retriever.setDataSource(source). It keeps returning a null.
I have ended up fixing it by doing the following
I have tested on my other Android phones and it seems to work fine. But not sure what impact that has on other phones. I also realised if I run
Then I always get File not found.
So I have had to add a
.replace("file://", "")
Can I create a PR for this or you see any problems?
The text was updated successfully, but these errors were encountered: